I have a RadGrid implemented where I use a column in the dataset that is not shown to sort a column (Quality_Sort) that is shown in the RadGrid.
I do this by assigning the 'sort'-column to the sortexpression of the boundcolumn.
boundColumn.SortExpression = "Quality_Sort";
The GridBoundColumn can have value 'Low', 'Medium' and 'High'.
In the column 'Quality_Sort' these values are represented as 1, 2 and 3.
When I click on the header of the column the sorting works as expected ('Low' > 'Medium' > 'High'). When I select the option 'Sort Ascending' from the headercontextmenu the sorting will result in an alphabetical sorting ('High' > 'Low' > 'Medium').
Is this a bug?
Paul
6 Answers, 1 is accepted
You can handle the ItemCommand of the grid check the what sort expression is assigned in each case. If necessary you can modify the sort expression and rebind the control to achieve the desired sorting.
Generally sorting from the header context menu should result in the same sort expression assinged to the grid.
Marin
Telerik
When will this be solved?
Paul
Are both types of sorting (header and header context menu) targeted towards the same field in the datasource?
It will be helpful if you can send us a sample runnable project so we can check it on our side and let you know if this is an issue with the control or problem with the setup.
Marin
Telerik
(Reply to thread cannot be created because:
- Please upload valid files: .gif,.jpg,.jpeg,.png smaller than 2MB.)
Paul
If the file is larger than 2 MB you can open a support ticket and attach it there or if you prefer you can upload it to a file sharing web site and provide the link to download it from there.
Regards,Marin
Telerik
(zip files are not allowed here, even when the size is 23kB).
Paul