# C1.WPF.FlexGrid.UnboundSort.SortUnboundGrid

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_FlexGrid_UnboundSort_SortUnboundGrid_" data-uid="C1.WPF.FlexGrid.UnboundSort.SortUnboundGrid*">SortUnboundGrid Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_FlexGrid_UnboundSort_SortUnboundGrid_" data-uid="C1.WPF.FlexGrid.UnboundSort.SortUnboundGrid*"></a>
<h4 id="C1_WPF_FlexGrid_UnboundSort_SortUnboundGrid_C1_WPF_FlexGrid_C1FlexGrid_System_Collections_Generic_IList_C1_WPF_FlexGrid_UnboundSortDescription__System_Int32_System_Int32_" data-uid="C1.WPF.FlexGrid.UnboundSort.SortUnboundGrid(C1.WPF.FlexGrid.C1FlexGrid,System.Collections.Generic.IList{C1.WPF.FlexGrid.UnboundSortDescription},System.Int32,System.Int32)">SortUnboundGrid(C1FlexGrid, IList&lt;UnboundSortDescription&gt;, int, int)</h4>
<div class="markdown level1 summary"><p>Sorts the rows in an unbound grid.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void SortUnboundGrid(C1FlexGrid flex, IList&lt;UnboundSortDescription&gt; sortDescriptions, int startRow, int endRow)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub SortUnboundGrid(flex As C1FlexGrid, sortDescriptions As IList(Of UnboundSortDescription), startRow As Integer, endRow As Integer)</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="../C1.WPF.FlexGrid.4.6.2/C1.WPF.FlexGrid.C1FlexGrid.html">C1FlexGrid</a></td>
      <td><span class="parametername">flex</span></td>
      <td><p>Grid to be sorted.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList</a>&lt;<a class="xref" href="C1.WPF.FlexGrid.UnboundSortDescription.html">UnboundSortDescription</a>&gt;</td>
      <td><span class="parametername">sortDescriptions</span></td>
      <td><p>List of <a class="xref" href="C1.WPF.FlexGrid.UnboundSortDescription.html">UnboundSortDescription</a> objects that specify the columns to sort on.</p>
</td>
    </tr>
    <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>First row in the range to be sorted.</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>Last row in the range to be sorted.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_FlexGrid_UnboundSort_SortUnboundGrid_" data-uid="C1.WPF.FlexGrid.UnboundSort.SortUnboundGrid*"></a>
<h4 id="C1_WPF_FlexGrid_UnboundSort_SortUnboundGrid_C1_WPF_FlexGrid_C1FlexGrid_System_Collections_Generic_IList_C1_WPF_FlexGrid_UnboundSortDescription__" data-uid="C1.WPF.FlexGrid.UnboundSort.SortUnboundGrid(C1.WPF.FlexGrid.C1FlexGrid,System.Collections.Generic.IList{C1.WPF.FlexGrid.UnboundSortDescription})">SortUnboundGrid(C1FlexGrid, IList&lt;UnboundSortDescription&gt;)</h4>
<div class="markdown level1 summary"><p>Sorts the selected rows in an unbound grid.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void SortUnboundGrid(C1FlexGrid flex, IList&lt;UnboundSortDescription&gt; sortDescriptions)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub SortUnboundGrid(flex As C1FlexGrid, sortDescriptions As IList(Of UnboundSortDescription))</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="../C1.WPF.FlexGrid.4.6.2/C1.WPF.FlexGrid.C1FlexGrid.html">C1FlexGrid</a></td>
      <td><span class="parametername">flex</span></td>
      <td><p>Grid to be sorted.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList</a>&lt;<a class="xref" href="C1.WPF.FlexGrid.UnboundSortDescription.html">UnboundSortDescription</a>&gt;</td>
      <td><span class="parametername">sortDescriptions</span></td>
      <td><p>List of <a class="xref" href="C1.WPF.FlexGrid.UnboundSortDescription.html">UnboundSortDescription</a> objects that specify the columns to sort on.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_FlexGrid_UnboundSort_SortUnboundGrid_C1_WPF_FlexGrid_C1FlexGrid_System_Collections_Generic_IList_C1_WPF_FlexGrid_UnboundSortDescription___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If only one row is selected, this method sorts the whole grid.</p>
</div>
</div>
