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

SortDescriptor removed when click on column header

1 Answer 72 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Manishkumar
Top achievements
Rank 1
Manishkumar asked on 13 Oct 2011, 09:01 AM
I am using SortDescriptor  for multi column sorting in TreeListView. My requirement is there is a context menu appearing on columns cells with option like "Sort Ascending" & "SortDescending". When user right click on any cell then i find the corresponding column and add to SortDescriptor. So now when i add the column to SortDescriptor then the column header is highlighted with a small tringle. This is working fine for multiple columns.

My Problem is suppose I have 10 columns out of which I have added three columns to SortDescriptor and now 3 column header are highlighted. This is done by right click context menu. Now user directly click on 4th column header to sort. In that case the previous 3 columns are removed from SortDescriptor automatically and the user clicked column only highlighted. In my case I need to show all those 4 columns highlighted with 4 values in SortDescriptor. Please help me how I will be able to do.

Thanks

1 Answer, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 18 Oct 2011, 10:10 AM
Hi Manishkumar,

I would advise you to disable the default sorting by setting CanUserSortColumns to "False" and try subscribing to GridViewHeaderCell's MouseLeftButtonUp event executing your custom sorting logic in the callback. Please, let me know whether this solution is applicable in your case and do not hesitate to ask us for a code example if you have encountered any obstacles while implementing it.

Kind regards,
Ivan Ivanov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
TreeListView
Asked by
Manishkumar
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Share this question
or