Hello!!
This will be my first post hoping to get the answer as soon as possible...
With regards to the Subject, is there a way to Bind the Object Properties declaratively to the DetailTable of the Grid.
Lets assume this is my Object Structure
Class Person
Property PersonName As String
Property Hobbies As List(Of Hobby)
Property Nationality As String
End Class
Class Hobby
Property ID As Integer
Property Description as String
End Class
And this is my Grid Structure
<telerik:RadGrid ID="myGrid" runat="server">
<MasterTableView>
<Columns>
<telerik:GridBoundColumn DataField="PersonName " />
<telerik:GridBoundColumn DataField="Nationality " />
</Columns>
<DetailTables>
<telerik:GridTableView Name="HobbyList">
<Columns>
<telerik:GridBoundColumn DataField="Description" />
</Columns>
</telerik:GridTableView>
</DetailTables>
</MasterTableView>
</telerik:RadGrid>
My Problem is that I want bind the whole Person object to the Grid and to the DetailTables. When I retrieve the Person object, I will the whole Person object, including all the properties [Hobbies].
Although I have an alternate solution to this, and that is to handle the DetailDataBind event and bind the Property to the Detail manually using CodeBehind.
Is there a way to do it declaratively? My purpose for this is to automate things and reduce the Codes behind.
Thank You..
This will be my first post hoping to get the answer as soon as possible...
With regards to the Subject, is there a way to Bind the Object Properties declaratively to the DetailTable of the Grid.
Lets assume this is my Object Structure
Class Person
Property PersonName As String
Property Hobbies As List(Of Hobby)
Property Nationality As String
End Class
Class Hobby
Property ID As Integer
Property Description as String
End Class
And this is my Grid Structure
<telerik:RadGrid ID="myGrid" runat="server">
<MasterTableView>
<Columns>
<telerik:GridBoundColumn DataField="PersonName " />
<telerik:GridBoundColumn DataField="Nationality " />
</Columns>
<DetailTables>
<telerik:GridTableView Name="HobbyList">
<Columns>
<telerik:GridBoundColumn DataField="Description" />
</Columns>
</telerik:GridTableView>
</DetailTables>
</MasterTableView>
</telerik:RadGrid>
My Problem is that I want bind the whole Person object to the Grid and to the DetailTables. When I retrieve the Person object, I will the whole Person object, including all the properties [Hobbies].
Although I have an alternate solution to this, and that is to handle the DetailDataBind event and bind the Property to the Detail manually using CodeBehind.
Is there a way to do it declaratively? My purpose for this is to automate things and reduce the Codes behind.
Thank You..