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

[Solved] Can't emulate the Hierarchy with Template demo

2 Answers 129 Views
Grid
This is a migrated thread and some comments may be shown as answers.
andieje
Top achievements
Rank 1
andieje asked on 21 May 2009, 10:06 PM
Hi

I'm using Q3 2008 release

I am trying to copy your hierarchy with template demo and I can't get it to work.

Firstly when I expand an item in the master table to show the tab strip and its associated multi page control the first tab/page in the control is not displayed even though i have this in the asp.net code.

<telerik:RadTabStrip runat="server" ID="TabStrip1" MultiPageID="Multipage1"

 

 

SelectedIndex="0">


If i click on the tab nothing happens. If i click on another tab and then click back on the first tab the contents of the tab are displayed.

Here is my code. It uses the northwind database so you should just be able to copy and page it hopfully

 

 

 

<asp:ScriptManager ID="ScriptManager1" runat="server">

 

 

 

 

 

</asp:ScriptManager>

 

 

 

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="sqldatasource1">

 

 

 

 

 

<MasterTableView DataKeyNames="CustomerID" >

 

 

 

 

 

<ExpandCollapseColumn Visible="True">

 

 

 

 

 

</ExpandCollapseColumn>

 

 

 

 

 

<NestedViewTemplate>

 

 

 

 

 

 

<telerik:RadTabStrip runat="server" ID="TabStrip1" MultiPageID="Multipage1"

 

 

 

 

 

SelectedIndex="0">

 

 

 

 

 

<Tabs>

 

 

 

 

 

<telerik:RadTab runat="server" Text="Orders" PageViewID="PageView1">

 

 

 

 

 

</telerik:RadTab>

 

 

 

 

 

<telerik:RadTab runat="server" Text="Contact Information" PageViewID="PageView2">

 

 

 

 

 

</telerik:RadTab>

 

 

 

 

 

<telerik:RadTab runat="server" Text="Statistics Chart" PageViewID="PageView3">

 

 

 

 

 

</telerik:RadTab>

 

 

 

 

 

</Tabs>

 

 

 

 

 

</telerik:RadTabStrip>

 

 

 

 

 

<telerik:RadMultiPage runat="server" ID="Multipage1" RenderSelectedPageOnly="false">

 

 

 

 

 

<telerik:RadPageView runat="server" ID="PageView1">

 

 

 

 

 

<asp:Label ID="Label1" Font-Bold="true" Font-Italic="true" Text='<%# Eval("CustomerID") %>'

 

 

 

 

 

runat="server" />

 

 

 

 

PageView 1

 

 

 

 

<telerik:RadGrid runat="server" ID="RadGrid2">

 

 

 

 

 

<MasterTableView DataSourceID="SqlDataSource2">

 

 

 

 

 

<Columns>

 

 

 

 

 

<telerik:GridBoundColumn DataField="OrderDate"></telerik:GridBoundColumn>

 

 

 

 

 

</Columns>

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

</telerik:RadGrid>

 

 

 

 

 

 

<asp:SqlDataSource ID="SqlDataSource2" ConnectionString="Data Source=SQLExpress;Initial Catalog=Northwind;Integrated Security=true;"

 

 

 

 

 

ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM Orders Where CustomerID = @CustomerID"

 

 

 

 

 

runat="server">

 

 

 

 

 

 

<SelectParameters>

 

 

 

 

 

<asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="CustomerID" />

 

 

 

 

 

</SelectParameters>

 

 

 

 

 

 

</asp:SqlDataSource>

 

 

 

 

 

</telerik:RadPageView>

 

 

 

 

 

</telerik:RadMultiPage>

 

 

 

 

 

</NestedViewTemplate>

 

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

</telerik:RadGrid>

 

 

 

 

 

 

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=SQLExpress;Initial Catalog=Northwind;Integrated Security=true;" SelectCommand="select * from customers"

 

 

 

 

 

 

></asp:SqlDataSource>

 


Many thanks

 

andrea

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 22 May 2009, 06:12 AM
Hello Andrea,

Try setting the SelectedIndex of the Multipage also to the selected tab's pageview index as shown in the code below:
aspx:
<telerik:RadMultiPage runat="server" ID="Multipage1" SelectedIndex="0" RenderSelectedPageOnly="false"
 <telerik:RadPageView runat="server" ID="PageView1"
   ... 
 </telerik:RadPageView> 
</telerik:RadMultiPage>  

Thanks
Princy.
0
andieje
Top achievements
Rank 1
answered on 22 May 2009, 08:13 PM
That fixed it, thanks
Tags
Grid
Asked by
andieje
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
andieje
Top achievements
Rank 1
Share this question
or