# C1.Win.FlexGrid.C1FlexGridBase.AfterSort

## Content

<div class="doc-site-dotnet-api-container">




<h1 id="C1_Win_FlexGrid_C1FlexGridBase_AfterSort" data-uid="C1.Win.FlexGrid.C1FlexGridBase.AfterSort" class="text-break">AfterSort Event
</h1>
<div class="markdown level0 summary"><p>Fires after a column is sorted by a click on a column header.</p>
</div>
<div class="markdown level0 conceptual"></div>
<h6><strong>Namespace</strong>: <a class="xref" href="C1.Win.FlexGrid.html">C1.Win.FlexGrid</a></h6>
<h6><strong>Assembly</strong>: C1.Win.FlexGrid.10.dll</h6>
<h5 id="C1_Win_FlexGrid_C1FlexGridBase_AfterSort_syntax">Syntax</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public event SortColEventHandler AfterSort</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Event AfterSort As SortColEventHandler</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Win.FlexGrid.SortColEventHandler.html">SortColEventHandler</a></td>
      <td>Fires after a column is sorted by a click on a column header.</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_FlexGrid_C1FlexGridBase_AfterSort_remarks"><strong>Remarks</strong></h5>
<div class="markdown level0 remarks"><p>This event only fires if the sorting was caused by a click on a column header cell (see the 
<a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.AllowSorting.html#C1_Win_FlexGrid_C1FlexGridBase_AllowSorting">AllowSorting</a> property). It does not fire after sorting with the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.Sort.html#C1_Win_FlexGrid_C1FlexGridBase_Sort_C1_Win_FlexGrid_SortFlags_System_Int32_">Sort(SortFlags, int)</a> method.</p>
<p>This event is useful if you want to update user interface elements to reflect the new sorting. 
To prevent certain columns from being sorted, or to alter their default sorting order, use the 
<a class="xref" href="C1.Win.FlexGrid.Column.AllowSorting.html#C1_Win_FlexGrid_Column_AllowSorting">AllowSorting</a> or handle the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.BeforeSort.html">BeforeSort</a> event.</p>
</div>
</div>
