I know this isn't available in the form UltraWebTab1.Tabs(0).Selected = True but thats what I'm trying to get to. Depending on what an end-user selects I want a certain tab to show up. I previously read a post on how to use the client side events to do this, something like below...
function gotoGSMtab(){var ultraTab = igtab_getTabById('<%=wtService.ClientID %>');ultraTab.setSelectedIndex(0);return false;}
I would like to call this from a SelectedIndexChanged of a regular drop down in the code behind, something like this...
Dim sbc As String = "" Select Case tab Case "a" wtService.Tabs(0).Visible = True sbc = "<script type='text/javascript'>" sbc = sbc + "var ultraTab = igtab_getTabById('<%=wtService.ClientID %>');" sbc = sbc + "ultraTab.setSelectedIndex(0);" sbc = sbc + ("</script>") Case "b" wtService.Tabs(1).Visible = True sbc = "<script type='text/javascript'>" sbc = sbc + "var ultraTab = igtab_getTabById('<%=wtService.ClientID %>');" sbc = sbc + "ultraTab.setSelectedIndex(1);" sbc = sbc + ("</script>") End Select ClientScript.RegisterStartupScript(Me.GetType(), "RM", sbc)
So is this approach working or you are having some problems with that? Are you getting any javascript errors in the browser or just nothing happens? The approach seem perfectly valid to me.
One thing that may be problematic is that ClientScript.RegisterStartupScript places the javascript at the bottom of the page and at this point it might be still too early (tabstrip might not be initialized). There are two possible solutions:
1. Place the script in a timeout, with say, 200 ms.
2. Utilize the InitializeTabs event described here - it gets fired at the first moment where it is safe to work with the tab
http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/WebTab_Client_Side_Events_CSOM.html
Thanks for the reply. I wasn't getting any type of errors before. That seemed to help out, a little bit of a hack on my part but I put the line...
setTimeout("gotoGSMtab()", 300);
...in the first line of my function and it seemed to work.
btw...I traveled to Bulgaria in July 2005 for 4 weeks. Spend a week in Sozopol on the Black Sea, absolutely beautiful!