tabstrip/multipage

G

Guest

Hello

I've been using the tabstrip and multipage controls and really like the way
this combination allows users to switch between tabs without a postback.

I'd like to get more detailed information about these controls but can only
find basic information on the internet. In particular, I'd like to hide or
disable tabs dynamically and I'm not sure how to do this. I'd appreciate any
examples or insight.

Thanks

Mardy
 
P

Patrick.O.Ige

have you tried using the selectedindexchanged .
But you have to set Autopostback ="true" and remember the tabstrip index
starts from "0"
Hope that helps
Patrick
 
P

Patrick.O.Ige

For example
If YourTab.SelectedIndex = 0 Then
tsHoriz.Items(0).Enabled = True
tsHoriz.Items(1).Enabled = False
End If
Hope this helps
Patrick
 
G

Guest

Patrick Thanks

I'm using the tabstip as a series of input screens to capture information,
Once the process is complete, I need to hide one of the tabs. So I'd like to
hide an entire tab dynamically from the code behind if the status of the
record is "approved".

I tried using the example you gave but had no success.
 
G

Guest

I think I got it

Aspx page:
<iewc:tabstrip id="tsHoriz" runat="server" >
<iewc:Tab Text="Assessment Details" id="tab0"></iewc:Tab>
<iewc:TabSeparator id="ts0"></iewc:TabSeparator>
<iewc:Tab Text="Allocate Requirements" id="tab1"></iewc:Tab>
<iewc:TabSeparator id="ts1"></iewc:TabSeparator>
<iewc:Tab Text="Results" id="tab2"></iewc:Tab>
<iewc:TabSeparator id="ts2"></iewc:TabSeparator>
<iewc:Tab Text=" Design Comments" id="tab3"></iewc:Tab>
<iewc:TabSeparator id="ts3"></iewc:TabSeparator>
<iewc:Tab Text="Attachments" id="tab4"></iewc:Tab>
<iewc:TabSeparator DefaultStyle="width:100%;"></iewc:TabSeparator>
<iewc:multipage id="mpHoriz" ...>
<iewc:pageView id="p0">...
</iewc:pageView>
<iewc:pageView id="p1">...
</iewc:pageView>
....
</iewc:multipage>

code behind:
Protected tab0 As Microsoft.Web.UI.WebControls.Tab
Protected ts0 As Microsoft.Web.UI.WebControls.TabSeparator
Protected tab1 As Microsoft.Web.UI.WebControls.Tab
Protected ts1 As Microsoft.Web.UI.WebControls.TabSeparator
Protected tab2 As Microsoft.Web.UI.WebControls.Tab
Protected ts2 As Microsoft.Web.UI.WebControls.TabSeparator
Protected tab3 As Microsoft.Web.UI.WebControls.Tab
Protected ts3 As Microsoft.Web.UI.WebControls.TabSeparator
Protected tab4 As Microsoft.Web.UI.WebControls.Tab
Protected p0 As Microsoft.Web.UI.WebControls.PageView
Protected p1 As Microsoft.Web.UI.WebControls.PageView
Protected p2 As Microsoft.Web.UI.WebControls.PageView
Protected p3 As Microsoft.Web.UI.WebControls.PageView
Protected p4 As Microsoft.Web.UI.WebControls.PageView


'in my sub that checks status of the current record.
tsHoriz.Items.Remove(tab1)
tsHoriz.Items.Remove(ts1)
mpHoriz.Controls.Remove(p1)

Mardy
 
G

Guest

One final note

This gets me close BUT if I have a postback anywhere in the tabstrip page,
I get a nasty viewstate error. This is apparently due to the removal of the
mutipage item.
 
P

Patrick.O.Ige

Try using :- tsHoriz.Items(1).Enabled = False
There were some issues when i worked with the TABSTRIP but can't really
recall now.
Let me know if that doesn;t work and i''ll get back to you.
Patrick
 
G

Guest

Tried that without success

Patrick.O.Ige said:
Try using :- tsHoriz.Items(1).Enabled = False
There were some issues when i worked with the TABSTRIP but can't really
recall now.
Let me know if that doesn;t work and i''ll get back to you.
Patrick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top