Rank: Newbie Groups: Member
Joined: 3/7/2013 Posts: 2
|
Hi i need to open and close tabitem in tabstrip. Really i need to agregatte a close button [X] in tabitem control and then delete from tabstrip.Items collection. Can i help me???
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
Hi,
This is technical possible but you will need to write JavaScript to do it. The basic idea is you have to set your tab item HTML text to raw HTML that will include everything you wanted: tab item text, close button, and JavaScript code to handle click on the close button. Inside your JavaScript handler, u can either raises a post back to the server in your JavaScript code, or simply hide the clicked tab if there is only a limited number of tabs.
Thanks!
|
Rank: Newbie Groups: Member
Joined: 3/7/2013 Posts: 2
|
Hi i wrote this code to open the tab:
protected void OpenTab(object sender, EventArgs e) { EO.Web.TabItem SampleTab= new TabItem(); SampleTab.Text = btn.ID; TabStrip1.Items.Add(SampleTab); } I add this event to LinkButton and it works perfectly.
Can i delete de TabStrip1.Itmes.Remove(SampleTab)??? This is not working.
If i run this:
TabStrip1.Items.RemoveAt(1); this remove always the item 1 but i want to delete the tabitem depends on closebutton in those page click.
Thnx.
|