Turn off ismodified after code is put into the edit control

Hello,

I have a program that generates a script and is put into the edit control with editor.test = <string>
The editor marks all lines as modified and also asks (of course) if the code is modified if save is needed
Is there a way to mark all lines as unmodified after the code is given to the edit control and if the user modifies the code mark these lines as modifies?

Thanks,
Klaas

3 Replies

SK Senthil Kumaran Rajan Syncfusion Team August 31, 2018 09:47 AM UTC

Hi Klaas, 
 
Thank you for contacting Syncfusion support. 
 
In EditControl if we assign the text using “EditControl.Text” property which can override the default text contained in EditControl. Due to this EditControl mark the text as Modified. We suggest you to use EditControl.BeginInit() and EditControl.EndInit() methods to resolve the reported query. Please refer the below code snippet. 
 
 
            this.editControl1.BeginInit(); 
            this.editControl1.Text = "Your Code"; 
            this.editControl1.EndInit(); 
 
 
We have prepared sample for your reference and it can be downloaded from below location. 
 
 
Please let us know if you require further assistance. 
 
Regards, 
Senthil 



KB Klaas Brant August 31, 2018 05:38 PM UTC

Works perfectly, thanks!


SK Senthil Kumaran Rajan Syncfusion Team September 3, 2018 04:14 AM UTC

Hi Klaas, 
  
Thank you for your update. 
  
We are glad to know that, your requirement has been achieved. Please let us know if you need any further assistance, we will be happy to assist you. 
  
Regards, 
Senthil 
 


Loader.
Up arrow icon