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

Custom sorting

1 Answer 27 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Yaakov Davis
Top achievements
Rank 1
Yaakov Davis asked on 28 Dec 2010, 09:23 AM
When setting e.Cancel = true on the event args of RadGridVoew.Sorting event, the grid nevertheless modifies the SortingState of columns.
Say the column was in Descending. In the event handler I set it to Ascending, and set e.Cancel = true.

I expect the final state to be Ascending, but the grid changes it to None, according to its internal logic.

Using Reflector, I can see that UpdateColumnSortStatesOnSort() is called in GridViewDataControl.Sort(), even if sortingArgs.Cancel == true. I believe that that call should be avoided.

1 Answer, 1 is accepted

Sort by
0
Accepted
Yavor Georgiev
Telerik team
answered on 28 Dec 2010, 10:56 AM
Hi Yaakov Davis,

 Thank you for noting this issue. I have awarded you telerik points for your help. It will be fixed in a future release. In the mean time, as a workaround, you can make sure that the NewSortingState in the sorting event args matches the OldSortingState.

Best wishes,
Yavor Georgiev
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
Tags
GridView
Asked by
Yaakov Davis
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
Share this question
or