# GrapeCity.Documents.Excel.IPivotTable.SetRowAxisLayout

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Excel_IPivotTable_SetRowAxisLayout_" data-uid="GrapeCity.Documents.Excel.IPivotTable.SetRowAxisLayout*">SetRowAxisLayout Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Excel_IPivotTable_SetRowAxisLayout_" data-uid="GrapeCity.Documents.Excel.IPivotTable.SetRowAxisLayout*"></a>
<h4 id="GrapeCity_Documents_Excel_IPivotTable_SetRowAxisLayout_GrapeCity_Documents_Excel_LayoutRowType_" data-uid="GrapeCity.Documents.Excel.IPivotTable.SetRowAxisLayout(GrapeCity.Documents.Excel.LayoutRowType)">SetRowAxisLayout(LayoutRowType)</h4>
<div class="markdown level1 summary"><p>This method is used for simultaneously setting layout options for all existing PivotFields.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">void SetRowAxisLayout(LayoutRowType rowLayout)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Sub SetRowAxisLayout(rowLayout As LayoutRowType)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Excel.LayoutRowType.html">LayoutRowType</a></td>
      <td><span class="parametername">rowLayout</span></td>
      <td><p>Specifies the type of layout row.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_Documents_Excel_IPivotTable_SetRowAxisLayout_GrapeCity_Documents_Excel_LayoutRowType__examples">Examples</h5>
<pre><code class="lang-csharp">worksheet.Range["A1:C5"].Value = new object[,] {
    {"Category", "Product", "Amount"},
    {"Beverages", "Tea", 100},
    {"Beverages", "Coffee", 200},
    {"Snacks", "Biscuits", 150}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:C5"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["E1"], "SalesPivot");
pivotTable.PivotFields["Category"].Orientation = PivotFieldOrientation.RowField;
pivotTable.PivotFields["Product"].Orientation = PivotFieldOrientation.RowField;
pivotTable.SetRowAxisLayout(LayoutRowType.TabularRow);</code></pre>

</div>
