Populate data in RadTab Strip

2 posts, 0 answers
  1. Ritzie
    Ritzie avatar
    28 posts
    Member since:
    Jan 2009

    Posted 30 Oct 2009 Link to this post

    Hello All,

                 I am using a Rad Tab Strip control for "MultiPage" My multipage consists of many

                 RadPageView.And all the  radpageview consists of many textboxes.I have to populate the texboxes on the itemcommand  of     the Rad Grid.
    Please help me with useful suggesstions.



    Thankx in advance
    Ritz
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 12 Nov 2009 Link to this post

    Hi Ritzie,

    I guess you the RadTabStrip and RadMultiPage are placed inside NestedViewTemplate of RadGrid. Here is the code that I tried to access the textboxes placed in PageViews in ItemCommand event.

    ASPX:
     
        <NestedViewTemplate> 
            <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" 
                SelectedIndex="0"
                <Tabs> 
                    <telerik:RadTab runat="server" Selected="True" Text="Root RadTab1"
                    </telerik:RadTab> 
                    <telerik:RadTab runat="server" Text="Root RadTab2"
                    </telerik:RadTab> 
                </Tabs> 
            </telerik:RadTabStrip> 
            <telerik:RadMultiPage ID="RadMultiPage1" runat="server"
                <telerik:RadPageView ID="RadPageView1" runat="server" Selected="true"
                    <asp:TextBox ID="TextBox1" runat="server" Text="RadPageView1"></asp:TextBox> 
                </telerik:RadPageView> 
                <telerik:RadPageView ID="RadPageView2" runat="server"
                    <asp:TextBox ID="TextBox2" runat="server" Text="RadPageView2"></asp:TextBox> 
                </telerik:RadPageView> 
            </telerik:RadMultiPage> 
        </NestedViewTemplate> 

    CS:
     
        protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
        { 
            if (e.CommandName == RadGrid.ExpandCollapseCommandName && !e.Item.Expanded) 
            { 
                GridNestedViewItem item = (GridNestedViewItem)(e.Item as GridDataItem).ChildItem; 
                TextBox t1 = (TextBox)item.FindControl("TextBox1"); // Access the textbox in pageview1 and populate 
                t1.Text = "Text Changed -1"
                TextBox t2 = (TextBox)item.FindControl("TextBox2"); // Access the textbox in pageView2 and populate 
                t2.Text = "Text Changed -2"
            } 
        } 

    -Shinu.
Back to Top