access controls in tabstrip

4 posts, 0 answers
  1. Hector Hernandez
    Hector Hernandez avatar
    45 posts
    Member since:
    Oct 2009

    Posted 27 Jan 2010 Link to this post

    Hello, me again
    I have one RadMultiPage and i have 7 tabs
    in each tab i have some controls, radtextbox, asptextobos, radgrids, etc
    i need access the control of any tab, from any tab

    thanks for your time

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 28 Jan 2010 Link to this post

    Hello Hector,

    Here's an example of how to access a control embedded in one tab of a RadTabStrip form another tab. Check it out and see if it helps:
    aspx:
    <telerik:RadTabStrip ID="RadTabStrip1" SelectedIndex="0" MultiPageID="RadMultiPage1" runat="server"
        <Tabs> 
            <telerik:RadTab Text="Tab1" PageViewID="RadPageView1">         
            </telerik:RadTab> 
            <telerik:RadTab Text="Tab2" PageViewID="RadPageView2">         
            </telerik:RadTab> 
            <telerik:RadTab Text="Tab3" PageViewID="RadPageView3">         
            </telerik:RadTab> 
            ... 
        </Tabs> 
    </telerik:RadTabStrip> 
     
    <telerik:RadMultiPage ID="RadMultiPage1" SelectedIndex="0" RenderSelectedPageOnly="false" runat="server"
         <telerik:RadPageView ID="RadPageView1" runat="server">               
              <telerik:RadTextBox AutoPostBack="true" ID="RadTextBox1" runat="server" OnTextChanged="RadTextBox1_TextChanged">   
              </
    telerik:RadTextBox> 
         </telerik:RadPageView> 
         <telerik:RadPageView ID="RadPageView2" runat="server">               
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> 
         </telerik:RadPageView> 
         <telerik:RadPageView ID="RadPageView3" runat="server"
                 You are on the third tab! 
         </telerik:RadPageView> 
         ... 
    </telerik:RadMultiPage>     

    c#:
      protected void RadTextBox1_TextChanged(object sender, EventArgs e) 
        { 
            string strtxt = TextBox1.Text; 
        } 

    Thanks
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Hector Hernandez
    Hector Hernandez avatar
    45 posts
    Member since:
    Oct 2009

    Posted 28 Jan 2010 Link to this post

    i  think i dont explain my sely very well
    here again

    I have one page aspx (example.aspx)
    in this page i have two controls: TabStrip, RadMultiPage

    y have 7 tabs, and for each tab i have a Web User Control (ascx), 1. (generalinfo.ascx) 2. (workinfo.ascx)
    so, the thing is:
    i want to access the controls in generalinfo.ascx and workinfo.ascx from example.aspx
     
    hope someone can help me!!
  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 02 Feb 2010 Link to this post

    Hi Hector,

    It doesn't matter for the user controls that they're placed inside RadPageView, if the user control has ID="control1" and contains a textbox with ID="TextBox1", the textbox can be found like this:

    TextBox txt = (TextBox)control1.FindControl("TextBox1");


    Kind regards,
    Yana
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
Back to Top