Change does not persist after a postback

2 posts, 1 answers
  1. JC
    JC avatar
    30 posts
    Member since:
    Feb 2013

    Posted 25 Feb 2013 Link to this post


    There is a RadTabStrip control in my user home page and I want to add a new tab to it using Javascript. I am able to add a new tab but the issue is that the change is not persisting after some postback is made. Am I missing something to save the change? Please help.

  2. Answer
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 25 Feb 2013 Link to this post

    Hello JC,

    I believe you are not using the trackChanges and commitChanges client side methods. Client side changes are available on the server side after postback but only changes to the tabs that occur between a call to trackChanges and commitChanges persist after a postback.

    Please have a look at the following code which works fine at my end. I am adding tabs to RadTabStrip on clicking a RadButton using client side code.

    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="WebBlue">
            <telerik:RadTab runat="server" Text="Telerik">
            <telerik:RadTab runat="server" Text="ASP">
            <telerik:RadTab runat="server" Text="Ajax">
    <telerik:RadButton ID="RadButton1" runat="server" Text="Add Tab" OnClientClicked="AddTab"></telerik:RadButton>

    <script type="text/javascript">
        function AddTab(sender, args) {
            var tabStrip = $find("<%= RadTabStrip1.ClientID %>");
            var tab = new Telerik.Web.UI.RadTab();
            tab.set_text("New Tab");

Back to Top