We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

TabControlAdv cancelling Label edit

Hi,

I was trying to figure out how can I cancel TabControlAdv from editing after calling StartLabelEdit?

Thanks!

1 Reply

CR Chandran R Syncfusion Team September 17, 2013 02:59 PM UTC

Hi Erwin Magsino,

 

Thanks for using syncfusion products.

 

Query

Response

I was trying to figure out how can I cancel TabControlAdv from editing after calling StartLabelEdit?

We would like to inform that , TabControlAdv comes with the renaming functionality similar to MS Excel. Users can edit TabControlAdv's text at run-time using the LabelEdit property which has to be set to True.

 

You could cancel the editing by using the event “ AfterEdit”.

 

Please make use the below code snippet:

 

    this.tabControlAdv1.AfterEdit += new Syncfusion.Windows.Forms.Tools.EditEventHandler(this.tabControlAdv1_AfterEdit);

 

 

    private void tabControlAdv1_AfterEdit(object sender, Syncfusion.Windows.Forms.Tools.EditEventArgs e)

        {

            e.EditText = this.tabControlAdv1.TabPages[this.tabControlAdv1.SelectedIndex].Text;

        }

 

I have created a sample as per your requirement please find the sample from attachments.

 

For your reference:

http://help.syncfusion.com/ug/windows%20forms/tools/default.htm#!Documents/3810tabcontroladvevents.htm

 

 

Regards,

 

Chandran R



Sample_17cae65f.zip

Loader.
Live Chat Icon For mobile
Up arrow icon