I am trying to find a way to hide the content section based on what tab is selected.
Tab1 Tab2 Hide
So when Tab1/2 is clicked the content is shown, But clicking Hide hides the content section. Currently I have nothing in the hide template but it still puts empty box where the content would be. It there any property/style I can use to hide the content section?
Hi Rob,
Latest versions of WebTab should have boolean property VisibleContent. On client that property is available as set_visibleContent(bool).
If your version of WebTab has that, then you may use something like below. Otherwise, you may consider to get latest service release for NetAdvantage.
<script type="text/javascript">function WebTab1_SelectedIndexChanged(sender, eventArgs){ var hide = eventArgs.get_tabIndex() == 2; sender.set_visibleContent(!hide);}</script><ig:WebTab ID="WebTab1" runat="server" Width="300px" Height="300px"> <Tabs> <ig:ContentTabItem runat="server" Text="Tab 1"> </ig:ContentTabItem> <ig:ContentTabItem runat="server" Text="Tab 2"> </ig:ContentTabItem> <ig:ContentTabItem runat="server" Text="Tab 3"> </ig:ContentTabItem> </Tabs> <ClientEvents SelectedIndexChanged="WebTab1_SelectedIndexChanged" /></ig:WebTab>