BCGControlBar Library for .NET
Sort Method (GridData)




Index of column to sort by (it's not an index in column collection, it's GridColumn.DataIndex).
Specifies the sort order (ascending - true, descending - false).
Sorts rows by specified column in specified order.
Syntax
'Declaration
 
Public Sub Sort( _
   ByVal columnIndex As Integer, _
   ByVal ascending As Boolean _
) 
'Usage
 
Dim instance As GridData
Dim columnIndex As Integer
Dim ascending As Boolean
 
instance.Sort(columnIndex, ascending)
public void Sort( 
   int columnIndex,
   bool ascending
)
public: void Sort( 
   int columnIndex,
   bool ascending
) 
public:
void Sort( 
   int columnIndex,
   bool ascending
) 

Parameters

columnIndex
Index of column to sort by (it's not an index in column collection, it's GridColumn.DataIndex).
ascending
Specifies the sort order (ascending - true, descending - false).
Remarks
In Group Mode the group index and the group tree are sorted according to the columnIndex.
If AccessRealDataOnly is true, the real RowCollection is sorted.
Otherwise GridData creates a sorted index collection and does not modify the RowCollection.
Requirements

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

See Also

Reference

GridData Class
GridData Members

Send Feedback