Tab Text Change through code behind

3 posts, 0 answers
  1. bharat kumar
    bharat kumar avatar
    53 posts
    Member since:
    Jan 2010

    Posted 03 Mar 2010 Link to this post


    Hi,

    i have one Radtabstrip in aspx page having 3 tabs inside it.

    <

     

    telerik:RadTabStrip ID="TabStrip" runat="server" MultiPageID="RadMultiPage1" SelectedIndex="0">

     

     

    <Tabs>

     

     

    <telerik:RadTab Text="person"></telerik:RadTab>

     

     

    <telerik:RadTab Text="finance"></telerik:RadTab>

     

     

    <telerik:RadTab Text="Deadlines"></telerik:RadTab>

     

     

    </Tabs>

     

     

    </telerik:RadTabStrip>

    now i want to change the text of tab inside my code in aspx.cs at runtime.
    example like person became persondetails.

    i could not able to find the controls and collection in code behind file.

    can anyone please help me.

    thanks in advance.

     

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 04 Mar 2010 Link to this post

    Hi Bharat,

    Access the corresponding RadTab and set the Text property to required as shown below.

    C#:
     protected void Button1_Click(object sender, EventArgs e) 
        { 
            RadTab tab = (RadTab) RadTabStrip1.FindTabByText("person"); 
            tab.Text = "Person Details"
        }  
     


    -Shinu.



  3. bharat kumar
    bharat kumar avatar
    53 posts
    Member since:
    Jan 2010

    Posted 04 Mar 2010 Link to this post

    Thank you Shinu very much...
    it works.
Back to Top