Hi,
Using RadGrid v2008.3.1204.35, I'm DataBinding to an object datasource. Each object has aggregated objects, for example
I'm trying to set ClientDataKeyName to use the Id of the an aggregate object :
but I receive the following exception :
I am able to declare a GridBoundColumn's DataField to the following without any problem though :
What is the problem? Can you provide any valid workaround ? I've found this thread, but is there a better way ? I'd like to avoid using a flat DataSet or a flat result object if possible...
Thanks,
Dominic.
Using RadGrid v2008.3.1204.35, I'm DataBinding to an object datasource. Each object has aggregated objects, for example
class ClassA { |
private ClassB _objB; |
private ClassC _objC; |
public ClassB ObjB { get { return _objB; } } |
public ClassC ObjC { get { return _objC; } } |
... |
} |
List<ClassA> list = new List<ClassA>(); |
... |
RadGrid.DataSource = list; |
I'm trying to set ClientDataKeyName to use the Id of the an aggregate object :
<MasterTableView ClientDataKeyNames="ObjB.Id"> |
but I receive the following exception :
DataBinding: 'ClassA' does not contain a property with the name 'ObjB.Id' |
I am able to declare a GridBoundColumn's DataField to the following without any problem though :
<telerik:GridBoundColumn UniqueName="Name" DataField="ObjB.Name" DataType="System.String" HeaderText="Name" /> |
What is the problem? Can you provide any valid workaround ? I've found this thread, but is there a better way ? I'd like to avoid using a flat DataSet or a flat result object if possible...
Thanks,
Dominic.