By default, empty cells are included while sorting in the GridGroupingControl. To keep these empty cells always at the bottom while sorting, you have to implement an IComparer interface.
This customized sorting can be done by having a user-defined class that implements the IComparer interface and writing the custom comparer code in the Compare() method. Excluding the empty cells can be done by finding the length of the string in the Compare() method and cancelling its sorting, thereby pushing the empty cells to the bottom. Refer to the following code for implementing the Compare() method.
You can create an instance of the SortColumnDescriptor for a particular column and set the Comparer() method to the instance of the inherited IComparer class. You can also initialize its sorting direction by using Sort Direction property.
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|