ArcGIS Explorer Component Help |
RowCollection..::.RemoveSort Method |
RowCollection Class Example See Also |
Removes the sort on a RowCollection and orders the rows by the OBJECTID Column.
Namespace:
ESRI.ArcGISExplorer.DataAssembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public void RemoveSort() |
Visual Basic (Declaration) |
---|
Public Sub RemoveSort |
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