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

tabstrip tabs are preserving their initial enabled property setting on postback

1 Answer 48 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
gunther
Top achievements
Rank 1
gunther asked on 26 Feb 2010, 04:59 PM

i am using a tabstrip, some tabs of which are inintially disabled via markup code:

<Tabs>
    <telerik:RadTab Text="Arrangement" Value="Arrangement" />
    <telerik:RadTab Text="Specials" Value="Specials" Enabled="false" />
    <telerik:RadTab Text="Monthly Commitments" Enabled="false" Value="MonthlyCommitments" />
</Tabs>

i then have client code that enables the tabs based on certain client-side events like so:

function SelectSpecialsTab() {
    Page_ClientValidate();

    if (Page_IsValid) {
        var Tab = GetTab("Specials");
        Tab.enable();
        Tab.click();
    }

    return false;
}

this works fine.  however, everytime the server is hit via postback or ajaxmanager request client code (.ajaxRequest(string), for example), the tabs revert back to their initial enabled property settings, disabled in this case.

i've even tried taking the enabled = "false" property out of the markup and setting it in the codebehind in a !ispostback block, but it still disables the tabs.  when i take the enabled = "false" logic out completely from the markup and codebehind, the tabs stay enabled.

any idea on how to keep this from happening?

1 Answer, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 01 Mar 2010, 04:10 PM
You need to make sure that you are using trackChanges() and commitChanges() in your client-side functions that affect the TabStrip otherwise the changes you make will not be persisted to the server-side and this kind of behavior (where any server-side calls render an unchanged TabStrip) will occur. You can find more about these functions in this documentation article.
Tags
TabStrip
Asked by
gunther
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Share this question
or