# GrapeCity.ActiveReports.PageReportModel.SortBy

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_ActiveReports_PageReportModel_SortBy" data-uid="GrapeCity.ActiveReports.PageReportModel.SortBy" class="text-break">SortBy Class
</h1>
  <div class="markdown level0 summary"><p>Represents an element that defines an expression by which to sort the groups.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">SortBy</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="GrapeCity.ActiveReports.PageReportModel.IValidateable.html">IValidateable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.ActiveReports.PageReportModel.html">GrapeCity.ActiveReports.PageReportModel</a></h6>
  <h6><strong>Assembly</strong>: MESCIUS.ActiveReports.Core.Rdl.dll</h6>
  <h5 id="GrapeCity_ActiveReports_PageReportModel_SortBy_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public sealed class SortBy : IValidateable</code></pre>
  </div>
  <h5 id="GrapeCity_ActiveReports_PageReportModel_SortBy_examples"><strong>Examples</strong></h5>
  <p>An example of creating a simple sorting:</p>
<pre><code class="lang-csharp">var sortBy = new SortBy { SortExpression = { "=Fields!Type.Value" }, Direction = SortByDirection.Descending };</code></pre>

  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_ActiveReports_PageReportModel_SortBy__ctor" data-uid="GrapeCity.ActiveReports.PageReportModel.SortBy.#ctor">
          <a class="xref" href="GrapeCity.ActiveReports.PageReportModel.SortBy.-ctor.html#GrapeCity_ActiveReports_PageReportModel_SortBy__ctor">SortBy()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.ActiveReports.PageReportModel.SortBy.html">SortBy</a> class.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_ActiveReports_PageReportModel_SortBy__ctor_GrapeCity_Enterprise_Data_Expressions_ExpressionInfo_GrapeCity_ActiveReports_PageReportModel_SortByDirection_" data-uid="GrapeCity.ActiveReports.PageReportModel.SortBy.#ctor(GrapeCity.Enterprise.Data.Expressions.ExpressionInfo,GrapeCity.ActiveReports.PageReportModel.SortByDirection)">
          <a class="xref" href="GrapeCity.ActiveReports.PageReportModel.SortBy.-ctor.html#GrapeCity_ActiveReports_PageReportModel_SortBy__ctor_GrapeCity_Enterprise_Data_Expressions_ExpressionInfo_GrapeCity_ActiveReports_PageReportModel_SortByDirection_">SortBy(ExpressionInfo, SortByDirection)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.ActiveReports.PageReportModel.SortBy.html">SortBy</a> class using a specified sort expression and direction.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_ActiveReports_PageReportModel_SortBy_Direction" data-uid="GrapeCity.ActiveReports.PageReportModel.SortBy.Direction">
          <a class="xref" href="GrapeCity.ActiveReports.PageReportModel.SortBy.Direction.html#GrapeCity_ActiveReports_PageReportModel_SortBy_Direction">Direction</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a direction of the sort.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_ActiveReports_PageReportModel_SortBy_SortExpression" data-uid="GrapeCity.ActiveReports.PageReportModel.SortBy.SortExpression">
          <a class="xref" href="GrapeCity.ActiveReports.PageReportModel.SortBy.SortExpression.html#GrapeCity_ActiveReports_PageReportModel_SortBy_SortExpression">SortExpression</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets an expression by which to sort the groups.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_ActiveReports_PageReportModel_SortBy_Validate_GrapeCity_ActiveReports_PageReportModel_ValidationContext_" data-uid="GrapeCity.ActiveReports.PageReportModel.SortBy.Validate(GrapeCity.ActiveReports.PageReportModel.ValidationContext)">
          <a class="xref" href="GrapeCity.ActiveReports.PageReportModel.SortBy.Validate.html#GrapeCity_ActiveReports_PageReportModel_SortBy_Validate_GrapeCity_ActiveReports_PageReportModel_ValidationContext_">Validate(ValidationContext)</a>
        </td>
        <td class="markdown level1 summary"><p>Validates the current state of the <a class="xref" href="GrapeCity.ActiveReports.PageReportModel.SortBy.html">SortBy</a> object.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="extensionmethods">Extension Methods</h3>
  <div>
      <a class="xref" href="GrapeCity.ActiveReports.Rdl.Tools.CollectionExtensions.AddRange.html#GrapeCity_ActiveReports_Rdl_Tools_CollectionExtensions_AddRange__2___0_System_Collections_Generic_IEnumerable___1__">CollectionExtensions.AddRange&lt;TCollection, TItem&gt;(TCollection, IEnumerable&lt;TItem&gt;)</a>
  </div>

</div>
