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

Deleting tab in Client side Error

0 Answers 62 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
kian
Top achievements
Rank 1
kian asked on 18 Oct 2008, 11:11 AM
Hi
I'm using below function for deleting a tab from a radtabstrip in client side.

function deleteTab(tabText)
{
var tabStrip = $find("<%= RadTabID.ClientID %>");
var multiPage = $find("<%= MultiPgID.ClientID %>");

var tab = tabStrip.findTabByText(tabText);
var pageView = tab.get_pageView();
                
var tabToSelect = tab.get_nextTab();
if (!tabToSelect)
tabToSelect = tab.get_previousTab();
                
tabStrip.trackChanges();
tabStrip.get_tabs().remove(tab);
tabStrip.commitChanges();
                
multiPage.trackChanges();
multiPage.get_pageViews().remove(pageView);
multiPage.commitChanges();
                
if (tabToSelect)
tabToSelect.set_selected(true);
   }


By using this function, tab is deleted in client side but when I want to add a deleted tab again to the tabstrip in server side, I encounter with this error:

Two components with the same id 'MyUserControl_userControl_RadNumericTextBox1' can't be added to the application.

I think this tab is deleted in client side but exists in server side. because for example when I use server side event like button click that raise post back, deleting process happens correctly.
Tanx


No answers yet. Maybe you can help?

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