Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am using the tabcontainer in my application. In that I am using three tab panels and each tab panel contains lots of text boxes with validation controls. If there was any validation error in any of the tab I need to set the focus for that text boxes inside the tab panels. How to do this one. Can any one help me to solve this problem.

Thanks in Advance
Posted
Comments
Sergey Alexandrovich Kryukov 25-Oct-11 2:11am    
Tag it! Forms, Silverlight, WPF, ASP.NET, what?
--SA

1 solution

Call Control.Focus to set keyboard focus. The only problem is: it will throw exception of a control is not visible or enables, same goes for its parent, recursively. In case of tab control, make sure appropriate tab page is selected — use the property SelectedIndex.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900