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

Tab clones(error!!!)

0 Answers 50 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Kazakov
Top achievements
Rank 1
Kazakov asked on 18 Jul 2012, 12:15 PM

Hello, all! I had a problem with RadTabStrip. I create a Tab on the client-side by means of a method:

            function addNewTab(id) {
                var tabStrip = $find("<%= RadTabStrip1.ClientID %>");
                var tab = tabStrip.findTabByValue(id);
   
                if (!tab) {
                   tab = new Telerik.Web.UI.RadTab();
                     var tabName = "Message №" + id;
                   tab.set_text(tabName);
                   tab.set_value(id);
                   tabStrip.trackChanges();
                   tabStrip.get_tabs().add(tab);
                   tabStrip.commitChanges();                            

                       var multiPage = $find("<%= RadMultiPage1.ClientID %>");
                   var pageViewId = multiPage.findPageViewByID("<%= pageViewDetal.ClientID %>");
                   tab.set_pageViewID(pageViewId._id);
               }
               tab.set_selected(true);
              }

Everything is created correctly (i.e. the Tab is created, the value transferred by me is specified for it and PageView is attached to it) but as soon as on page there is PostBack, all created Tabs are cloned, i.e. each Tab created by me has 2 clones, but without the specified value and not attached to PageView, and Tab with the same title is simple.

Creation of clones occurs without the aid of my function. You couldn't prompt the reason of such behavior of the RadTabStrip component and how it is corrected?

No answers yet. Maybe you can help?

Tags
TabStrip
Asked by
Kazakov
Top achievements
Rank 1
Share this question
or