This is a migrated thread and some comments may be shown as answers.

Sort in saved layout does not work

2 Answers 64 Views
GridView
This is a migrated thread and some comments may be shown as answers.
IT Department
Top achievements
Rank 1
IT Department asked on 17 May 2011, 03:41 PM
If a sort is saved as part of a layout it is not honored when the layout is loaded. The column header has the sort indicator (black triangle indicating ascending/descending), but the data appears in the order of the underlying data source, not the order specified in the layout.

If I click on the column header the data is sorted, but the sort added as part of the layout definition is ignored. It almost seems as though there is some sort of "apply" method that needs to be called.

I believe that this worked in 2010Q1, but is broken in 2011Q1.

2 Answers, 1 is accepted

Sort by
0
IT Department
Top achievements
Rank 1
answered on 17 May 2011, 04:33 PM
I stumbled across the solution to this problem. Because custom sorting is now defined at the template level rather than the column level, I had the AllowCustomSorting turned on because I needed custom sorting on one column. My custom sorting delegate only dealt with the contents of this one column.
 
I am using the SortChanged event to turn custom sorting on and off depending on whether my one column that requires custom sorting is being sorted, but the SortChanged event does not fire when the layout is loaded.

By disabling custom sorting by default I was able to solve my problem.
0
Martin Vasilev
Telerik team
answered on 20 May 2011, 02:23 PM
Hello Grant Fish,

Thank you for writing.

I am glad you have found solution for your case. However, I have checked the described scenario and both SortChanged and CustomSorting events are thrown on layout loading. Without any additional information or/and source code I cannot be sure what caused the issue in your project. Please, could you send me your project. This will help me to investigate further this issue.

I look forward to your reply.

Greetings,
Martin Vasilev
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
Tags
GridView
Asked by
IT Department
Top achievements
Rank 1
Answers by
IT Department
Top achievements
Rank 1
Martin Vasilev
Telerik team
Share this question
or