Gets a value indicating whether the RowCollection is sorted.

Namespace:  ESRI.ArcGISExplorer.Data

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public bool IsSorted { get; }
Visual Basic (Declaration)
Public ReadOnly Property IsSorted As Boolean

Field Value

trueTruetruetrue (True in Visual Basic) if sorted; otherwise, falseFalsefalsefalse (False in Visual Basic).

Examples

The code below sorts a RowCollection by two columns using the Sort method, checks to ensure that it is sorted using the Sorted property, prints out all the sorted values, then removes the sort using the RemoveSort method.
CopyC#
{
  //Open file geodatabase feature class
  Table mountainsTable = Table.OpenFileGeodatabaseTable(@"C:\Data\Scotland.gdb", "Mountains");

  //Get all the rows
  RowCollection rows = mountainsTable.GetRows();

  //Sort the RowCollection alphabetically by both the Type and by the Name Columns
  rows.Sort("Type,Name");

  //Check to ensure that the RowCollection is now sorted
  if (rows.IsSorted == true)
  {
    //Iterate over all the rows, printing out the contents of each Row
    foreach (Row mtnRow in rows)
    {
      System.Diagnostics.Debug.Print(mtnRow.Values.ToString());
    }

    //Now remove the sort - the rows will be sorted by OBJECTID
    rows.RemoveSort();   
  }
}
CopyVB.NET
'Open file geodatabase feature class
Dim mountainsTable As Table = Table.OpenFileGeodatabaseTable("C:\Data\Scotland.gdb", "Mountains")

'Get all the rows
Dim rows As RowCollection = mountainsTable.GetRows()

'Sort the RowCollection alphabetically by both the Type and by the Name Columns
rows.Sort("Type,Name")

'Check to ensure that the RowCollection is now sorted
If rows.IsSorted = True Then
  'Iterate over all the rows, printing out the contents of each Row
  For Each mtnRow As Row In rows
    System.Diagnostics.Debug.Print(mtnRow.Values.ToString())
  Next

  'Remove the sort - the rows will be sorted by OBJECTID
  rows.RemoveSort()
End If

See Also