GridControl.Modified property isn''t working

Hi, I''m trying to check the state of the entire grid before I let a user leave a form. I force the Modified property on Form load like this: if (c.GetType() == typeof(Syncfusion.Windows.Forms.Grid.GridControl)) { Syncfusion.Windows.Forms.Grid.GridControl gridinfo =(Syncfusion.Windows.Forms.Grid.GridControl)c; gridinfo.Modified = false; } This does set the flag to false. As soon as I hit the "Next" button to go to the next form, the Modified flag instantly changes to true, even without anything changing within the grid. I''m checking using the following code: if (c.GetType() == typeof(Syncfusion.Windows.Forms.Grid.GridControl)) { Syncfusion.Windows.Forms.Grid.GridControl gridinfo =(Syncfusion.Windows.Forms.Grid.GridControl)c; if(gridinfo.Modified) { MessageBox.Show("Please save changes before proceeding.","Changes Detected",MessageBoxButtons.OK,MessageBoxIcon.Hand); return false; } } What''s up? I''m using version 3.301 Thanks!

1 Reply

AD Administrator Syncfusion Team March 17, 2006 07:43 AM UTC

Hi JV, Please check for the control ( c ) in the Form_Load event. It seems that the modified flag is not set. We have tried setting the property in the following manner and it works. // In form_load event this.gridControl1.Modified = false; Let us know if this helps. Best regards, Madhan.

Loader.
Up arrow icon