The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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!
ADAdministrator 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.