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

nested Radgrid with RadMultipage problem

4 Answers 62 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mohammed
Top achievements
Rank 1
Mohammed asked on 22 Oct 2011, 07:19 AM
Hello everybody

I'm new in Telerik controls and this is my first post here. I'm trying to create a nested Radgrids of two levels where each record of parent will be related to two child records. I'm trying to use RadMultiPage with RadTabStrip to display the two childs as a radgrid.

The skeleton of my code is like this
<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
    </telerik:RadScriptManager>
    <asp:SqlDataSource ID="SqlDataSource1" ></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" ></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource3" ></asp:SqlDataSource>
    <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" >
        <MasterTableView DataSourceID="SqlDataSource1">
            <NestedViewTemplate>
                <telerik:RadTabStrip ID="RadTabStrip1" MultiPageID="RadMultiPage1">
                    <Tabs>
                        <telerik:RadTab PageViewID="PageView1"></telerik:RadTab>
                        <telerik:RadTab PageViewID="PageView2"></telerik:RadTab>
                    </Tabs>
                </telerik:RadTabStrip>
                <telerik:RadMultiPage ID="RadMultiPage1">
                    <telerik:RadPageView ID="PageView1">
                        <telerik:RadGrid ID="RadGrid2" DataSourceID="SqlDataSource2" >
                            <MasterTableView DataSourceID="SqlDataSource2">
                                <Columns>
                                    <telerik:GridBoundColumn></telerik:GridBoundColumn>
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>
                    </telerik:RadPageView>
                    <telerik:RadPageView ID="PageView2">
                        <telerik:RadGrid ID="RadGrid3" DataSourceID="SqlDataSource3">
                            <MasterTableView DataSourceID="SqlDataSource3">
                                <Columns>
                                        <telerik:GridBoundColumn></telerik:GridBoundColumn>
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>
                    </telerik:RadPageView>
                </telerik:RadMultiPage>
            </NestedViewTemplate>
            <Columns>
                <telerik:GridBoundColumn></telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
</form>

I removed unnecessary code.

With this skeleton and when I click on the each records, it show the tabs but it did not list any records. I thought at the beginning that the problem of missing <ParentTableRelation> tag, but how to make the nested radgrid related to its parent. The problem that I could not use <GridTableView> because I could not integrate it with RadMultipage and RadTabStrip controls.

I want something like this example.

Any Idea plz?

Mohammed

4 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 22 Oct 2011, 08:00 AM
Hello,

Please look in this link once.

if you still have issue then let me know.


Thanks,
Jayesh Goyani
0
Mohammed
Top achievements
Rank 1
answered on 22 Oct 2011, 08:19 AM
Thank you Jayesh,
Actually I'm totally new to Visual Studio. I tried to follow instructions in this video. I could not do it through abstract coding using C# or VB. How to connect code to database.

If you can help me with ASP it would much easier to me.

0
Mohammed
Top achievements
Rank 1
answered on 22 Oct 2011, 10:46 AM
I think the point is in the key being send from the parent Radgrid to the child one. I'm not sending any key right now. I don't know how to do it!!

any ideas plz?
0
Jayesh Goyani
Top achievements
Rank 2
answered on 22 Oct 2011, 11:27 AM
Hello,

You can set the datakey by using below code line.

<MasterTableView  DataKeyNames="ID" >

the logic of how to get that datakey ? , which was already in demo.

let me know if any concern.


Thanks,
Jayesh Goyani
Tags
Grid
Asked by
Mohammed
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Mohammed
Top achievements
Rank 1
Share this question
or