Enables you to sort data using custom rules.
public event CustomColumnSortEventHandler CustomColumnSort
Public Event CustomColumnSort As CustomColumnSortEventHandler
The CustomColumnSort event handler receives an argument of the CustomColumnSortEventArgs type. The following properties provide information specific to this event.
|Column||Gets the column whose values are being compared.|
|Handled||Gets or sets whether a comparison operation is handled and no default processing is required.|
|ListSourceRowIndex1||Gets the index of the first of the two rows being compared in the data source.|
|ListSourceRowIndex2||Gets the index of the second of the two rows being compared in the data source.|
|Result||Gets or sets the result of a custom comparison.|
|SortOrder||Gets the sort order applied to the column.|
|Source||Gets the grid control that raised the event.|
|Value1||Gets the first value being compared.|
|Value2||Gets the second value being compared.|
When this event is fired, two rows should be compared. The column being processed is specified by the Column parameter. The Value1 and Value2 parameters identify the values of the rows within this column. The result of the custom comparison should be set to the Result parameter as follows:
The event parameter's Handled property should be set to true if the comparison operation was handled. You can leave this parameter set to false to invoke the default comparison mechanism after your event handler has finished. In this instance, the custom comparison operation's result is ignored.