BCGSoft.Controls.Grid Namespace > GridData Class : SortData Method |
'Declaration Public Sub SortData( _ ByVal columnIndex As Integer, _ ByVal ascending As Boolean, _ ByVal endColumnRangeIndex As Integer, _ ByVal startIndex As Integer, _ ByVal endIndex As Integer _ )
'Usage Dim instance As GridData Dim columnIndex As Integer Dim ascending As Boolean Dim endColumnRangeIndex As Integer Dim startIndex As Integer Dim endIndex As Integer instance.SortData(columnIndex, ascending, endColumnRangeIndex, startIndex, endIndex)
public void SortData( int columnIndex, bool ascending, int endColumnRangeIndex, int startIndex, int endIndex )
public: void SortData( int columnIndex, bool ascending, int endColumnRangeIndex, int startIndex, int endIndex )
public: void SortData( int columnIndex, bool ascending, int endColumnRangeIndex, int startIndex, int endIndex )
This methods sorts data in the specified range of columns and rows.
It does not change order of rows in RowCollection and does not create any additional sort index. It swaps data according to the sort order, e.g it modifies the GridDataRow.ItemCollection collections.
This is usable for Excel-like grids when you do not move columns and rows around.
The Grid control automatically calls SortData, when GridControl.OperationMode is set to ContentOperationMode.RepositionData.
If endColumnRangeIndex is -1 then the sort range covers one column specified by columnIndex.
You can set startIndex and endIndex to -1 to sort all rows in the grid.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2