The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
I am using 1.6.1.8 tab control ext. It has about 4 tab page exts. When I am on 2nd tab and try to set the tabVisible=false on the same tab, it removes the top tab header. But the tab page itself is still there. After that if I switch other tabs, it is hiding the tab page.
To reproduce this bug goto XPTabs sample.
Replace this method
private void tab1button1_Click(object sender, System.EventArgs e)
{
tab1.TabVisible = false;
}
Run the sample. Click on the "Contact info" tab. Now click on Fetch info button. Notice that you still see the email, address, phone # etc. fields.
It should hide this tab page even if it is visible.
thanks,
- Reddy
ASArun Srinivasan Syncfusion Team November 4, 2003 09:20 PM UTC
Hi Reddy,
This happens because there are instances where users want to just hide the tab and not it's contents and hence this is the intended behaviour when you try to hide an active tab.
You could do something like:
this.tab1.TabVisible=false;
this.tabControlExt1.SelectedTab = tab2;
to do what you are looking for.
Thanks
Arun
ADAdministrator Syncfusion Team November 5, 2003 11:31 AM UTC
Arun,
In one of our application windows we have about 5 tabs. When the user picks a menu item or clicks on a tooldbar buttons, some of the information in the window does not make sense at that point. So we hide couple of tabs (say tab 2 and tab3). If I am viewing tab2, when I click my toolbar button, it removes the tab from the tab strip. But the tab2-page and its controls are still visible. This is certainly not the behavior anybody would like with "TabVisible=false".
According to your work around, we will have to check if the tab is selected, then select some other tab and then hide it. We don't do this kind of things for other controls. Why just for this?
thanks,
- Reddy
ASArun Srinivasan Syncfusion Team November 5, 2003 11:51 AM UTC
Hi Reddy,
A better solution to do what you are looking for is to call the ValidateSelectedIndex() method as this will ensure that the current selected tab is not disabled or invisible.
So doing:
this.tab1.TabVisible=false;
this.tabControlExt1.ValidateSelectedIndex();
should take care of this issue.
Regards
Arun