Hi Lance,
This is a known issue in the .NET framework. For now, you could use the following workaround :
1. Handle the TabbedMDIManager''s TabControlAdded event and get the TabControlAdv associated with it
manager.TabControlAdded += new TabbedMDITabControlEventHandler(manager_TabControlAdded);
private void manager_TabControlAdded(object sender, TabbedMDITabControlEventArgs e)
{
this.tabcontrol = e.TabControl;
this.tabcontrol.SelectedIndexChanging +=new SelectedIndexChangingEventHandler(tabcontrol_SelectedIndexChanging);
}
2. Handle the SelectedIndexChanging event of this TabControlAdv and cancel the new tab selection if the entry in the present tab is invalid
private void tabcontrol_SelectedIndexChanging(object sender, SelectedIndexChangingEventArgs e)
{
if (form1.TextBoxText != "test")
{
if (form_loaded)
MessageBox.Show("Invalid Entry!");
e.Cancel = true;
}
}
Please refer to the
test sample attached that illustrates this, and let me know if this works for you.
Regards,
Guru Patwal
Syncfusion, Inc.