Question

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)

Was it helpful?

Solution

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)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top