# C1.WPF.FlexGrid.C1FlexGrid.AutoSizeRows

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_FlexGrid_C1FlexGrid_AutoSizeRows_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.AutoSizeRows*">AutoSizeRows Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_FlexGrid_C1FlexGrid_AutoSizeRows_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.AutoSizeRows*"></a>
<h4 id="C1_WPF_FlexGrid_C1FlexGrid_AutoSizeRows_System_Int32_System_Int32_System_Double_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.AutoSizeRows(System.Int32,System.Int32,System.Double)">AutoSizeRows(int, int, double)</h4>
<div class="markdown level1 summary"><p>Resizes a row range to fit their visible contents.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AutoSizeRows(int startRow, int endRow, double extra)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AutoSizeRows(startRow As Integer, endRow As Integer, extra As Double)</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="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">startRow</span></td>
      <td><p>Index of the first row to resize.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">endRow</span></td>
      <td><p>Index of the last row to resize.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">extra</span></td>
      <td><p>Extra height to add to the row, in pixels.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_FlexGrid_C1FlexGrid_AutoSizeRows_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.AutoSizeRows*"></a>
<h4 id="C1_WPF_FlexGrid_C1FlexGrid_AutoSizeRows_System_Int32_System_Int32_System_Double_System_Boolean_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.AutoSizeRows(System.Int32,System.Int32,System.Double,System.Boolean)">AutoSizeRows(int, int, double, bool)</h4>
<div class="markdown level1 summary"><p>Resizes a row range to fit their content.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AutoSizeRows(int startRow, int endRow, double extra, bool allCells)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AutoSizeRows(startRow As Integer, endRow As Integer, extra As Double, allCells As Boolean)</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="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">startRow</span></td>
      <td><p>Index of the first row to resize.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">endRow</span></td>
      <td><p>Index of the last row to resize.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">extra</span></td>
      <td><p>Extra height to add to the row, in pixels.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">allCells</span></td>
      <td><p>Whether to measure all cells, including those that are not currently visible.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_FlexGrid_C1FlexGrid_AutoSizeRows_System_Int32_System_Int32_System_Double_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Setting the <code class="paramref">allCells</code> parameter to true causes the grid to create and
measure cell elements for the entire grid content, including rows and columns that are
not currently visible. This option may be very time consuming if the grid contains a
lot of data.</p>
</div>
</div>
