karthikwaits4u
asked on
Enabling or Disabling a TabPage in VB.Net
Hi,
I want to Enanble or disable a Tabpage.
as we do in VB6 where whe can disable a tab from entering
by disabling that particular Tab.
Is there any possibility like that in VB.net
coz i need it for security reasons.
According to the user rights i have to enable or disable the Tabs.
It would be wonderful if you could help me in this.
I tried with the SelectedIndexChanged Event of the Tabstrip.
But it is not working fine.
Expecting your reply
With regards
Karthik
I want to Enanble or disable a Tabpage.
as we do in VB6 where whe can disable a tab from entering
by disabling that particular Tab.
Is there any possibility like that in VB.net
coz i need it for security reasons.
According to the user rights i have to enable or disable the Tabs.
It would be wonderful if you could help me in this.
I tried with the SelectedIndexChanged Event of the Tabstrip.
But it is not working fine.
Expecting your reply
With regards
Karthik
ASKER
Dear Desp,
Thanx for the advice.
But I Don't want to remove the Tab.
Because we have three modes (Add,Modify,View)
In the view mode the user can access all the Tabs in the TabControl
But if he clicks the modify or Add Button he must not be able to access
any other Tab. b'coz he has to complete the Add/ Modify operation
first on this TabPage.
So please help me.
I tried this code
TabRepOffice.TabPages(1).E nabled=fal se
This code actually works fine. It disables all the controls in TabPage1
but doesnot disable the TabPage.
So please help me in this issue
Regards
Karthik
Thanx for the advice.
But I Don't want to remove the Tab.
Because we have three modes (Add,Modify,View)
In the view mode the user can access all the Tabs in the TabControl
But if he clicks the modify or Add Button he must not be able to access
any other Tab. b'coz he has to complete the Add/ Modify operation
first on this TabPage.
So please help me.
I tried this code
TabRepOffice.TabPages(1).E
This code actually works fine. It disables all the controls in TabPage1
but doesnot disable the TabPage.
So please help me in this issue
Regards
Karthik
hi karthik,
u could use the selectedindex changed event here.......it is called whenever you change tabs....so in that event handler check if all the controls in the current tab pass the validation........if it does then allow tab change or else stay on the current tab...
u could use the selectedindex changed event here.......it is called whenever you change tabs....so in that event handler check if all the controls in the current tab pass the validation........if it does then allow tab change or else stay on the current tab...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Sony 1464
That really fixed my problem
Thanx for ur Kind Support
With Regards
Karthik
That really fixed my problem
Thanx for ur Kind Support
With Regards
Karthik
just dont show that page to the user:
http://oldlook.experts-exchange.com/questions/20682924/Removing-tab-from-tab-collection.html#8953532