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

access controls in tabstrip

3 Answers 106 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Hector Hernandez
Top achievements
Rank 2
Hector Hernandez asked on 27 Jan 2010, 06:42 PM
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

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 28 Jan 2010, 06:27 AM
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.
0
Hector Hernandez
Top achievements
Rank 2
answered on 28 Jan 2010, 05:10 PM
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!!
0
Yana
Telerik team
answered on 02 Feb 2010, 09:51 AM
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.
Tags
TabStrip
Asked by
Hector Hernandez
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Hector Hernandez
Top achievements
Rank 2
Yana
Telerik team
Share this question
or