11-20-2009 04:31 PM
How can a tab be hidden at runtime based on the account type in the webclient? Our client needs a tab to disappear for a certain value of Account Type and show up again if the type is changed to a different value.
Any thoughts and feedback are much appreciated.
11-24-2009 01:44 PM
You can accomplish this in v7.5.2 (I've not done it, but seem to recall this was a fix or enhancement in SP2).
In SP1, you will have to take a different approach where the Tab form itself remains, but you modify the visible contents of the form.
One approach is to create two Panels - stacked one on top of the other. One panel is empty, or maybe has a label on it indicating that this Tab only applies where Account.Type = "XXXXXX". The other panel has the normal data bound controls, etc.
Use the tab form OnLoad() event handler to examine the Account.Type value and then set one panel to Visible=true and the other to false.
11-24-2009 04:51 PM
Thanks for the response. My challenge is that there are multiple tabs applicable to different account types, and i need to show different combinations of them for each account type. So i cant really put them on a single tab on panels. I will try to go back to the client and indicate that they will need to upgrade(ouch) to be able to do this.
11-24-2009 04:59 PM
You might be able to construct a solution using the MultiTab control. One tab page in the multitab control for each Account.Type. Hide all tab pages except the one that matches the current Account.Type. Have a default multi-tab page to show if the Account.Type value is not one that you have a mathcing multi-tab page for.
Or maybe wait till you have upgraded them to SP2 ?