# GrapeCity.Wpf.SpreadSheet.Dialogs.BuiltInDialogs.Sort

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Wpf_SpreadSheet_Dialogs_BuiltInDialogs_Sort_" data-uid="GrapeCity.Wpf.SpreadSheet.Dialogs.BuiltInDialogs.Sort*">Sort Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Wpf_SpreadSheet_Dialogs_BuiltInDialogs_Sort_" data-uid="GrapeCity.Wpf.SpreadSheet.Dialogs.BuiltInDialogs.Sort*"></a>
<h4 id="GrapeCity_Wpf_SpreadSheet_Dialogs_BuiltInDialogs_Sort_GrapeCity_Wpf_SpreadSheet_GcSpreadSheet_System_String_System_Boolean_System_Boolean_" data-uid="GrapeCity.Wpf.SpreadSheet.Dialogs.BuiltInDialogs.Sort(GrapeCity.Wpf.SpreadSheet.GcSpreadSheet,System.String,System.Boolean,System.Boolean)">Sort(GcSpreadSheet, string, bool, bool)</h4>
<div class="markdown level1 summary"><p>Gets the custom sort dialog that allows choosing more options, such as sorting by multiple columns or rows, and case-sensitive sorts.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static IDialog Sort(GcSpreadSheet spread, string name, bool isWorksheet = true, bool isFromContextMenu = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Sort(spread As GcSpreadSheet, name As String, Optional isWorksheet As Boolean = True, Optional isFromContextMenu As Boolean = False) As IDialog</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.Wpf.SpreadSheet.GcSpreadSheet.html">GcSpreadSheet</a></td>
      <td><span class="parametername">spread</span></td>
      <td><p>The <a class="xref" href="GrapeCity.Wpf.SpreadSheet.GcSpreadSheet.html">GcSpreadSheet</a> control to work with.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">name</span></td>
      <td><p>name of the container object that contain the AutoFilter</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">isWorksheet</span></td>
      <td><p>the container object is worksheet or not (table)</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">isFromContextMenu</span></td>
      <td><p>open the dialog from filter context menu or not</p>
</td>
    </tr>
  </tbody>
</table>
<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="GrapeCity.Wpf.SpreadSheet.Dialogs.IDialog.html">IDialog</a></td>
      <td><p>The <a class="xref" href="GrapeCity.Wpf.SpreadSheet.Dialogs.IDialog.html">IDialog</a> object represents the custom sort dialog.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
