How can I cancel the tab selection change event?

How can I cancel the tab selection change event?

1 Reply

GS Gopalakrishnan S Syncfusion Team December 18, 2006 05:16 PM UTC

Hi James,

Thanks for using Syncfusion products.

You can use the SelectedIndexChanging event to cancel the Tab selection change event.

Here is the code snippet:

private void tabControlAdv1_SelectedIndexChanging(object sender, Syncfusion.Windows.Forms.Tools.SelectedIndexChangingEventArgs args)
{
if(args.NewSelectedIndex==2)
{
args.Cancel=true;
}
}

Please let me know if this helps.

Best Regards,
S.Gopal.

Loader.
Up arrow icon