0
votes

i have a TabControl with several TabPages and controls in every TabPage. I'm using some data binding and validation bult on entity framework. The problem is that when error occures on the tab, other than the visible one it cant be seen. Is there a way to make TabPage selected when the error occures on some control, hosted in it?(i don't know the index of the TabPage)

1
Pls give us more information about the error.abhilash
It doesn't depend on error. I want just to select tab on any error occured in it. I can do that with OnValidating event of all controls im validating, but i'm searching for amy other solution here, because validation is done automatically with EF, so there is no need in OnValidating then...If there is no way to focus tab on error-i'll use the choice with OnValidation. Thank you.0x49D1
you need it for WPF or WinForms?Arsen Mkrtchyan

1 Answers

1
votes

Yes, you can use any of the following TabControl's methods:

public void SelectTab(TabPage tabPage)
public void SelectTab(string tabPageName)
public void SelectTab(int index)