Hello,
I am using a Radgrid to display some data that I am returning via Linq. The procedure running the Linq statement returns the data as an IList<ActivityAssociation> (where ActivityAssociation is the type). This IList contains data from several different tables.
I want to allow the user to sort the data on the radgrid. I have no problem displaying the data, but if I use the IList as the DataSource, I cannot sort the data without errors being thrown.
If I traverse the IList, the properties I get are things such as ActivityAssociation.ActivityId, ActivityAssociation.PERSON.PERSON_NAME, etc. I can set the DataField to "ActivityId" as well as "PERSON.PERSON_NAME" and display the data fine, but if I set the Sort Expression to "PERSON.PERSON_NAME", it claims that it cannot find the column whenever I try to sort and rebind the table. I even re-generate the IList prior to rebinding.
I was able to get around this by looping through the IList and creating a DataTable to use as the grid's datasource, but this is not the optimal solution as the amount of data returned could be large.
Does anybody have any suggestions?
Thanks,
Dave
I am using a Radgrid to display some data that I am returning via Linq. The procedure running the Linq statement returns the data as an IList<ActivityAssociation> (where ActivityAssociation is the type). This IList contains data from several different tables.
I want to allow the user to sort the data on the radgrid. I have no problem displaying the data, but if I use the IList as the DataSource, I cannot sort the data without errors being thrown.
If I traverse the IList, the properties I get are things such as ActivityAssociation.ActivityId, ActivityAssociation.PERSON.PERSON_NAME, etc. I can set the DataField to "ActivityId" as well as "PERSON.PERSON_NAME" and display the data fine, but if I set the Sort Expression to "PERSON.PERSON_NAME", it claims that it cannot find the column whenever I try to sort and rebind the table. I even re-generate the IList prior to rebinding.
I was able to get around this by looping through the IList and creating a DataTable to use as the grid's datasource, but this is not the optimal solution as the amount of data returned could be large.
Does anybody have any suggestions?
Thanks,
Dave