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

[Solved] Tab Text Change through code behind

2 Answers 659 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
bharat kumar
Top achievements
Rank 1
bharat kumar asked on 03 Mar 2010, 05:10 PM

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 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 04 Mar 2010, 07:54 AM
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.



0
bharat kumar
Top achievements
Rank 1
answered on 04 Mar 2010, 12:46 PM
Thank you Shinu very much...
it works.
Tags
TabStrip
Asked by
bharat kumar
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
bharat kumar
Top achievements
Rank 1
Share this question
or