tabstrip/multipage

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
For example
If YourTab.SelectedIndex = 0 Then
tsHoriz.Items(0).Enabled = True
tsHoriz.Items(1).Enabled = False
End If
Hope this helps
Patrick
 
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.
 
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
 
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.
 
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
 
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
 
Back
Top