How to enable tabs in RadTabStrip

2 posts, 0 answers
  1. Tim
    Tim avatar
    6 posts
    Member since:
    Dec 2013

    Posted 06 Dec 2013 Link to this post

    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;
        }
    }
  2. Tim
    Tim avatar
    6 posts
    Member since:
    Dec 2013

    Posted 09 Dec 2013 Link to this post

    I solved the issue by enabling and disabling the tabs on the client side.
Back to Top