Telerik is rad grid is awesome and good to have control when you are in Rapid Application Development environment. Built-in features and client side support is really helpful in solving problems of creating a grid with full of features.
Grouping the records is similarly a feature that provide a view to see the records in a way like you see your Outlook inbox. And with its default properties its works nicely. But what if you have a default sorter applied on your datasource and you take an action to groupby records on Telerik rad grid, the groupby command will simply override the data source sorter to its default sorter i.e. the column which is used in group by.
That means if you groupby with a column say “Category” then you’ll loose the default sort that was let say sorted by Name.
So to apply your previous sort with grouped column you just need follow the below steps:
1. Write below code in your OnNeedDataSource event of RadGrid.
2. Now to prevent mess with original default sort command handle the sortcommand event and write the below snippet
Now you have both features applied RadGrid Grouping and your default sorter in the grouped records.
Note :- This approach will not work if you have multicolumn support enabled.