The grid initially renders fine. When I sort on particular properties on my business object I get the "Cannot find column" error. These particular properties are readonly properties that reference related business objects in my domain. For example, I have a list of distributions that I'm binding to the grid, but I also want to show associated contacts. To be able to do this I need to "flatten" my domain objects to include readonly properties for ContactFullName or DefaultBrokerOnAccount. By denormalizing my domain I'm able to bind related objects. I think we all do it this way unless I'm missing something revolutionary here. The properties in my Distribution object look like this:
public string ContactFullName
{
get { return (UpToContactByContactID == null) ? "" : UpToContactByContactID.FullName; }
}
public string DefaultBrokerOnAccount
{
get { return (UpToContactByContactID == null) ? "" : UpToContactByContactID.Account.DefaultRep; }
}
public string ContactFullName
{
get { return (UpToContactByContactID == null) ? "" : UpToContactByContactID.FullName; }
}
public string DefaultBrokerOnAccount
{
get { return (UpToContactByContactID == null) ? "" : UpToContactByContactID.Account.DefaultRep; }
}
Where the property "UpToContactByContactID" is of type Contact which is associated to my Distribution object. The telerik grid binds fine initially, but falls apart when I need to sort on these columns. If I give these columns setters and populate them like normal properties of the Distribution object I have no problems. This is seems to be a major issue but solvable since at least the grid recognizes the properties on the initial bind.
please help