Welcome Guest Search | Active Topics | Sign In | Register

Tabstrip Options
MKotaska
Posted: Tuesday, February 15, 2011 11:13:58 AM
Rank: Member
Groups: Member

Joined: 8/13/2007
Posts: 10
Hello,

I have a problem with Tabstrip component.

I'm using it in a page for selecting different tabs.

Tabstrip has set RaisesServerEvent to true.

I want to know which tab was selected when the page is postbacked. For that I use SelectedIndex property of Tabstrip instance.

Everything works good in case of I create tabs (items) manually in a design time.

When I try to add my tabs dynamically when the page is postbacked I get SelectedIndex to -1.

The construction for adding tabs is:

Tabstrip1.Items.Add ("New item");


Thank you fro your help.

Best regards.

Milan Kotaska
eo_support
Posted: Tuesday, February 15, 2011 11:55:20 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

This usually occurs when you recreated your tab items on every page request. In that case you are clearing all items which would also reset the SelectedIndex.

Try to put your code inside if (!Page.IsPostBack) and see if that works. If that still does not work, please try to isolate the problem into a separate test page and post the full test page. We will be happy to take a look once we have that.

Thanks!
MKotaska
Posted: Tuesday, February 15, 2011 4:43:02 PM
Rank: Member
Groups: Member

Joined: 8/13/2007
Posts: 10
Hello,

thank you very very much.
It helped.


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.