The Richard's suggestion goes in the correct direction. I would like to mention that setting the EnableSorting
property of RadGridView
will remove the currently added SortDescriptors
. This is why I could suggest you the following approach to achieve your requirements:
1. Add your visible/invisible columns.
2. Add the desired SortDescriptors
to both visible and invisible columns as required.
3. Set the AllowSort
property of your columns to 'false'
. It will not allow the user to change the sorting.
4. Use the ViewCellFormatting
event of RadGridView
to hide the sorting arrow:
sender, CellFormattingEventArgs e)
GridHeaderCellElement cell = e.CellElement
List<RadElement> elements = cell.GetChildrenByType(
(elements.Count > 0)
elements.Visibility = ElementVisibility.Collapsed;
I hope it helps in your scenario.
the Telerik team
Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.