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

Multi Column Sorting with Rad Grid

1 Answer 62 Views
Grid
This is a migrated thread and some comments may be shown as answers.
maulik
Top achievements
Rank 1
maulik asked on 02 Oct 2008, 01:18 AM
Hi ,

I'm currently using Rad Grid to display data. In the grid one the columns is a composite column means it is a combination of 3 columns from the table. For e.g. Name (FirstName + Middle Initials + Last Name). I want to allow the users to sort on that column but I'm not able to do it. I searched Telerik site and found MultiColumnSorting but no example on how to use it. Googling also didnt help me much.

This column is a label field in telerik:GridTemplateColumn. I'm SortExpression="FirstName" as an attribute. I've also registered SortCommand event. In that event I'm creating GridSortExpression object, assigning FirstName as its datafield property (If I assing FirstName, LastName ,  it throws an exception saying FirstName cannot be found but it is there in the table). I am also setting AllowMultiColumnSorting property to true but no luck. Any guidance on how to sort the Composite column.

Thanks in advance
Maulik Khandwala

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 03 Oct 2008, 05:00 AM
Hi Maulik,

Here is a code library submission which explains how to achieve sorting with subcolumns in a GridtemplateColum. Go through it and see if it helps.
Individual filtering and sorting for "sub-columns" in template column

Thanks
Shinu.
Tags
Grid
Asked by
maulik
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or