This is a migrated thread and some comments may be shown as answers.

Switch from DetailTables to NestedView

1 Answer 24 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Michael asked on 07 Feb 2011, 05:15 PM
Hi, I currently have my RadGrid setup with DetailTables, but I would like to switch to NestedView to have more control over the presentation of the data.  For my Detailtables I useOnDetailTableDataBind, but the NestedView doesn't have that property.  What is the best route take if I have a datasource that can only be generated programmatic?

<telerik:RadGrid ID="RadGrid1" runat="server"
    AllowSorting="True" GridLines="None" ShowGroupPanel="True"
    <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True">
        <Selecting AllowRowSelect="True" />
    <MasterTableView  DataKeyNames="ID" AllowMultiColumnSorting="True">
            <telerik:GridTableView DataKeyNames="ID"  Width="100%"
                runat="server" AutoGenerateColumns ="false">
                    <telerik:GridBoundColumn SortExpression="Joined" HeaderText="Joined" HeaderButtonType="TextButton"
                        DataField="Joined" UniqueName="Joined">
                    <telerik:GridBoundColumn SortExpression="Status" HeaderText="Status" HeaderButtonType="TextButton"
                        DataField="Status" UniqueName="Status">
                    <telerik:GridBoundColumn SortExpression="City" HeaderText="City" HeaderButtonType="TextButton"
                        DataField="City" UniqueName="City">

1 Answer, 1 is accepted

Sort by
Top achievements
Rank 1
answered on 08 Feb 2011, 05:55 AM
Hello Michael,

You can attach NeedDataSource event to inner grid and bind it through the NeedDataSource event. In the inner grid NeedDataSource event, you can get reference to the outer grid expanded item, e.g. the parent item. Thus you can get a data field value of the expanded item and use it for retrieving the inner grid data source.

For more information on this, please refer the following forum.
radGrid inside nestedviewTemplate problem

Asked by
Top achievements
Rank 1
Answers by
Top achievements
Rank 1
Share this question