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

RadTabStrip: Adding imagebutton to tab

1 Answer 139 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Bert
Top achievements
Rank 1
Bert asked on 30 Jul 2008, 02:30 PM

Hi,

I'm trying to create a dynamic tabstrip where the user can add./delete tabs at runtime. For adding and deleting I found some javascript code in the online demo's that works fine.

Now I just wants to know if it's possible to add an imageButton (close button) to the dynamically created tab (also in javascript).

Has anyone any idea?

This is my code at this moment

var tabStrip = $find("<%= rtsTabs.ClientID %>");
tabStrip.trackChanges();
var tab = tabStrip.findTabByValue(tabText);
var text = document.getElementById("PropertyTabsControl_rtsTabs_i" + index + "_txtNewTextBox").value;
if (text == "")
{
    text = "new tab";
}
tab.set_text(text);
tabStrip.commitChanges();

 var multiPage = $find('<%= multiPage.ClientID %>');
multiPage.trackChanges();
var pageView = new Telerik.Web.UI.RadPageView();
multiPage.get_pageViews().add(pageView);
pageView.get_element().id = ("PageView" + multiPage.get_pageViews().get_count());
pageView.set_selected(true);
multiPage.commitChanges();

 Now I just want to add some javascript code for adding a imagebutton on the tab.

Thanks

Bert

1 Answer, 1 is accepted

Sort by
0
Bert
Top achievements
Rank 1
answered on 04 Aug 2008, 09:25 AM
I solved this problem in server-side code.
I just add the imageButton in the preRender event of the usercontrol to each tab in my radTabstrip

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