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

Sort custom column

1 Answer 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
nader
Top achievements
Rank 1
nader asked on 27 Nov 2010, 01:35 AM
i have a radgrid contains gridtemplatecolumns need to be sorted. i know that i sort by sort expression and it works well.
but what if i had a gridtemplatecolumn which is custom. For example if i had Three columns :  Number1 ,  Number2 ,  SUM
Column SUM i set it's value by adding the values of Number1 and Number2.how can i sort Column SUM ???

1 Answer, 1 is accepted

Sort by
0
Accepted
Pavlina
Telerik team
answered on 29 Nov 2010, 10:37 AM
Hi Nader,

You can skip the default sort behavior and provide your own custom sort order for a column by setting the AllowCustomSorting property of the corresponding table view. With custom sorting enabled, RadGrid displays the sorting icons but does not actually sort the data. Instead, you perform the custom sorting inside the SortCommand event handler. Review this help topic for more information:
Applying custom sort criteria

All the best,
Pavlina
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
nader
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or