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.
Unfortunately, activation email could not send to your email. Please try again.

GridControl.Modified property isn''t working

Thread ID:





41997 Mar 16,2006 05:47 PM Mar 17,2006 02:43 AM Windows Forms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On March 16, 2006 05:47 PM

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!

Administrator [Syncfusion]
Replied On March 17, 2006 02:43 AM

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.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.