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

Sorting on subobjects in TemplateColumn

1 Answer 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Trevor
Top achievements
Rank 1
Trevor asked on 18 Jul 2008, 02:30 PM
I have a RadGrid populated by an ICollection of objects ("Contacts").  Each contact contains several sub-objects, such as a Customer, Person, etc.  The RadGrid displays, among other things, properties of these sub-objects (Customer.Name, Person.FullName, etc.) in TemplateColumns, but for some reason setting the SortExpression to the sub-object's property leads to the following ASP.NET error:
    "Cannot find column Person.FullName."

Is there a way (other than making Person.FullName a direct property of the main object) to sort on properties of sub-objects?  Am I just missing it?  And if not, why not?

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 21 Jul 2008, 06:52 AM
Hi Trevor,

I found a forum link discussing a similar error. Go through it and see if it helps.
Sorting with custom collection

Shinu.

Tags
Grid
Asked by
Trevor
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or