New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
Binding to SubObjects
You can use a wide variety of custom objects as data sources for RadGrid. The only requirement is that the custom objects must implement the ITypedList, IEnumerable, or ICustomTypeDescriptor interface. RadGrid can bind to subobjects by the intuitive and simple dot(.) syntax (specified through the DataField property of declaratively bound columns). This dot syntax is shown in the following example.
You may need to set the RetrieveNullAsDBNull property to true on the MasterTableView in order avoid binding problems.
ASP.NET
<telerik:GridBoundColumn DataField="Inner1.TestProp" HeaderText="Inner1.TestProp">
</telerik:GridBoundColumn><telerik:GridBoundColumn DataField="Inner1.Inner2.TestProp"
HeaderText="Inner1.Inner2.TestProp"></telerik:GridBoundColumn><telerik:GridBoundColumn
DataField="Inner1.Inner2.Inner1.TestProp" HeaderText="Inner1.Inner2.Inner1.TestProp"></telerik:GridBoundColumn>
For a live example that illustrates these features, see Various data sources.