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

Sorting of templated columns

1 Answer 63 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jerry Kurata
Top achievements
Rank 1
Jerry Kurata asked on 12 May 2010, 02:34 AM
Hi,
I have a grid with columns that display multiple fields in a cell.  The layout of the cell is defined via a template.  I have a few questions about the sorting.

  1. What is the best way to implement sorting of these columns?  For example a cell in the column could display the a value that is an average and the number of items that went in to determining the average.  When the user sorts the column I want to sort only on the average. 
  2. I also need to do multi-column sorting.
  3. Is there a way to ensure that any null columns end up at the end of the sort order after all of the rows with a value.

Thanks,

Jerry

1 Answer, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 13 May 2010, 01:39 PM
Hi Jerry Kurata,

You may  find the SortMemberPath property of the DataColumn useful in your case.

For more complex scenario you may implement a custom sorting like :
1. Handle the Sorting event of RadGridView ,
2. Within the event handler sort the item with your own logic

more info on custom sorting you may find in the this online article.

Regards,
Pavel Pavlov
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.
Tags
GridView
Asked by
Jerry Kurata
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Share this question
or