Welcome Guest Search | Active Topics | Sign In | Register

Open&Close TabItem in TabStrip On Demand Options
Igor André Guerra
Posted: Thursday, March 7, 2013 8:18:27 AM
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???
eo_support
Posted: Friday, March 8, 2013 9:14:00 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 23,159
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!
Igor André Guerra
Posted: Monday, March 11, 2013 7:32:19 PM
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.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.