This event defines a custom sort order for rows in a Grid control.
Private Sub grid_Compare(row1, row2, cmp)
When you set the Sort property to flexSortCustom, the Compare event occurs once for each pair of rows in the control that you want to compare. You should compare the rows manually and set a value for the cmp parameter.
The following table shows the values for cmp.
Setting |
Description |
–1 | row1 should appear before row2. |
0 | Both rows are equal or either row can appear before the other. |
1 | row1 should appear after row2. |