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

How to enable tabs in RadTabStrip

1 Answer 86 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Tim asked on 06 Dec 2013, 06:54 PM
I have a RadTabStrip on a page with three tabs. Each tab has a user control inside it.
When the user is editing an existing record, the tabs should be enabled. But when the user is entering a new record, the tabs should be disabled. After the user enters a new record and clicks the save button and the new record has been added to the database, I want to enable the tabs.
Ideally, I would enable the tabs in the RadTabStrip Load event, but this event fires before the user control is loaded and the events which add the new record to the database.
I tried enabling the tabs in the Page LoadComplete event, but this seems to have no effect. I verified with the debugger that the tabs are enabled inside the LoadComplete event, but they aren't enabled when the page is rendered. Is there some other way to accomplish this?
protected void Page_LoadComplete(object sender, EventArgs e)
{
    bool enabled;
    if (SessionHandler.SelectedID == "Unknown")
    {
      // new record
        enabled = false;
    }
    else
    {
      // existing record
        enabled = true;
    }
    foreach (RadTab tab in RadTabStrip1.Tabs)
    {
        tab.Enabled = enabled;
    }
}

1 Answer, 1 is accepted

Sort by
0
Tim
Top achievements
Rank 3
Iron
Iron
Iron
answered on 09 Dec 2013, 11:59 AM
I solved the issue by enabling and disabling the tabs on the client side.
Tags
General Discussions
Asked by
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Answers by
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Share this question
or