Lesson 4 - Manage Data
- 2 minutes to read
- Click the Order Date column header to select it.
Click the selected column header to sort data against the column. Click it again to change the sort order:
Shiftand click the Customer ID and Order ID columns to sort data against these two columns and preserve the previous sort settings.
Ctrlkey and click the Order ID column to clear sorting against this column.
- Specify the ColumnBase.SortOrder property for the Order Date and Customer ID columns to sort data against them.
- Specify the ColumnBase.SortIndex property for these columns to set the sort priority:
<dxg:GridColumn FieldName="CustomerID" IsSmart="True" SortIndex="0" SortOrder="Ascending"/> <dxg:GridColumn FieldName="OrderDate" IsSmart="True" SortIndex="1" SortOrder="Descending"/>
For information on how end users can sort data, refer to the following help topic: Sort Data.
Specify the GridColumn.GroupIndex property for the Ship Country and Ship City columns to group data against them and set the group priority:
<dxg:GridColumn FieldName="ShipCity" IsSmart="True" GroupIndex="1"/> <dxg:GridColumn FieldName="ShipCountry" IsSmart="True" GroupIndex="0"/>
For information on how end users can group data, refer to the following help topic: Group Data.
- Open the GridControl's property grid.
Invoke the Filter Editor window:
Specify the filter expression:
Specify the DataControlBase.FilterString property with a filter expression:
<dxg:GridControl FilterString="[OrderDate] > #2020-01-01# And [Freight] > 100" ...>
For information on how end users can filter data, refer to the following help topic: Filter Data.