on Mar 13, 2012
Hi, I seem to have bumped into a bug with the RibbonBar control.
When setting SelectedTabIndex having 4 tabs, all of the visible, everything works normally:
Ribbon.SelectedTabIndex = Ribbon.Tabs.IndexOf(Ribbon
However when I make some tabs invisible (index 0 and 2 in my case), it completely messes up the SelectedTabIndex property:
It defaults to 1, and it seems to be impossible to change. Even having this value it is still inconsistent, showing either tab 1 or 3:
When tab 1 is selected client side and a postback occurs, the selected tab will switch to 3 on the client side after postback and vice versa.
To make the tabs invisible I use:
Menu.Tabs(0).Visible = False
Menu.Tabs(2).Visible = False
Am I making a mistake or is this really a bug?
Update: It works when programatically removing the tabs before setting the index. This works for me as I won't need the invisible tabs on the client side or serverside anyway, but I imagine this might cause problems for other people.