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

Dynamically add a tab from a clic fired from a radgrid

1 Answer 38 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
TANSERI
Top achievements
Rank 1
TANSERI asked on 14 Oct 2010, 10:51 PM
Hi,

I have an issue on TabStrip.

I have a 2 tabs which are added dynamically. In one of the tab, i have a radgrid which is contained in a usercontrol. When I click on a row of the radgrid, i want to add an another tab dynamically.

The following code is executed when I click on a row in the radgrid :

protected void ContextGrid_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
    RadTabStrip tabStrip = (RadTabStrip)this.Page.FindControl("DetailTabStrip");
    RadTab tab = new RadTab();
    tab.Text = "My Tab 1";
    tabStrip.InnermostSelectedTab.Tabs.Add(tab);
}

The tab is not added, and nothing occurs.
The previous code I used doesn't work. Am i using the right code?

Please I need help thanks.


1 Answer, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 19 Oct 2010, 01:29 PM
Hello TANSERI,

The code seems correct. Is the user control added dynamically? If it is, please note that you should add it again on  every postback. Can you send us more details about your scenario?

Regards,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TabStrip
Asked by
TANSERI
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or