Custom Sort

2 posts, 0 answers
  1. Deborah
    Deborah avatar
    154 posts
    Member since:
    Sep 2010

    Posted 22 Apr 2011 Link to this post

    I need to perform a custom sort that is different depending on which column the user selects for the sort.

    I cannot seem to determine which column the user selected to sort within the CustomSorting event.

    e.Column and e.GridViewTemplate are both deprecated.

    How do I determine the column that the user selected for the sort within the CustomSorting event?
  2. Stefan
    Stefan avatar
    2908 posts

    Posted 27 Apr 2011 Link to this post

    Hello Deborah,

    Thank you for writing.

    You can determine which column or columns are being sorted by checking the SortDescriptors that are used in RadGridView. Each SortDescriptor has a property called PropertyName that will give you the name of the column that is being used for. 

    For example, if you sort Column A, the SortDescriptors collection will contain one sort descriptor and its PropertyName will be the name of Column A. If you make a complex sorting and sort Column A and then Column B, you will have two sort descriptors (one for A and one for B) in the SortDescriptors collection.

    I hope the provided information addresses your question. Should you have any other questions, do not hesitate to contact us.

    Kind regards,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top