We are trying to show the sort order in our RadGrid when the grid is sorted by multiple columns. We would like to use an integer in front of the column header text to show if it is the primary, secondary, or tertiary sort parameter. Is this currently possible?
I just implemented that feature and it works fine except when I reorder the columns (drag&drop).
The Grid's PreRender event is fired and the Label is added to all columns with a sort, but it isn't visible on the client. After another sort operation (or group) the sort order is visible again.
Do you have an idea why this just happens after column reorder?
These are my settings for reordering:
I have to do it server side so I can save the column order to database.
I also set "EnableColumnsViewState" to false because I add/remove columns at runtime (which works perfectly).
I have seen that when the columns are reordered, the NeedDataSource event is fired after RadGridPreRender. Maybe the setting of the Grid's DataSource is responsible for that behavior?
Thanks for your help!
0
Tsvetina
Telerik team
answered on 04 Apr 2012, 09:15 AM
Hello Jan-Patrick,
You could try moving your logic to the DataBound event handler of RadGrid. I tested this in my colleague's project and it worked as expected.
Kind regards,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.