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
Mardyhave you tried using the selectedindexchanged .
But you have to set Autopostback ="true" and remember the tabstrip index
starts from "0"
Hope that helps
Patrick
"Mardy" <Mardy@.discussions.microsoft.com> wrote in message
news:1DABCC32-74F8-49A9-B8DA-B8DFA4CC9539@.microsoft.com...
> 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
For example
If YourTab.SelectedIndex = 0 Then
tsHoriz.Items(0).Enabled = True
tsHoriz.Items(1).Enabled = False
End If
Hope this helps
Patrick
"Mardy" <Mardy@.discussions.microsoft.com> wrote in message
news:1DABCC32-74F8-49A9-B8DA-B8DFA4CC9539@.microsoft.com...
> 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
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.
"Patrick.O.Ige" wrote:
> For example
> If YourTab.SelectedIndex = 0 Then
> tsHoriz.Items(0).Enabled = True
> tsHoriz.Items(1).Enabled = False
> End If
> Hope this helps
> Patrick
> "Mardy" <Mardy@.discussions.microsoft.com> wrote in message
> news:1DABCC32-74F8-49A9-B8DA-B8DFA4CC9539@.microsoft.com...
> > 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
>
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
"Mardy" wrote:
> 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
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.
"Mardy" wrote:
> 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
>
> "Mardy" wrote:
> > 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
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
"Mardy" <Mardy@.discussions.microsoft.com> wrote in message
news:6D81C4DC-03EF-4C9C-8A13-4965D67E901B@.microsoft.com...
> 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.
>
>
> "Mardy" wrote:
> > 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
> > "Mardy" wrote:
> > > 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
Tried that without success
"Patrick.O.Ige" wrote:
> 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
>
> "Mardy" <Mardy@.discussions.microsoft.com> wrote in message
> news:6D81C4DC-03EF-4C9C-8A13-4965D67E901B@.microsoft.com...
> > 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.
> > "Mardy" wrote:
> > > 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
> > > > > "Mardy" wrote:
> > > > > 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
>
Will get back to you
Patrick
"Mardy" <Mardy@.discussions.microsoft.com> wrote in message
news:F8258DBF-204D-44D5-88AD-B6C78EEBAA2B@.microsoft.com...
> Tried that without success
> "Patrick.O.Ige" wrote:
> > 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
> > "Mardy" <Mardy@.discussions.microsoft.com> wrote in message
> > news:6D81C4DC-03EF-4C9C-8A13-4965D67E901B@.microsoft.com...
> > > 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.
> > > > > > > "Mardy" wrote:
> > > > > 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
> > > > > > > > "Mardy" wrote:
> > > > > > > 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
Mardy..
This should guide you with the Tabstrip:-
http://aspnet101.com/aspnet101/tutorials.aspx?id=28
Hope that helps
Patrick
"Mardy" <Mardy@.discussions.microsoft.com> wrote in message
news:F8258DBF-204D-44D5-88AD-B6C78EEBAA2B@.microsoft.com...
> Tried that without success
> "Patrick.O.Ige" wrote:
> > 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
> > "Mardy" <Mardy@.discussions.microsoft.com> wrote in message
> > news:6D81C4DC-03EF-4C9C-8A13-4965D67E901B@.microsoft.com...
> > > 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.
> > > > > > > "Mardy" wrote:
> > > > > 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
> > > > > > > > "Mardy" wrote:
> > > > > > > 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
0 comments:
Post a Comment