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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to make CurrentCell.IsModified still to false

Thread ID:

Created:

Updated:

Platform:

Replies:

47060 Jul 27,2006 09:49 AM UTC Aug 2,2006 02:37 AM UTC WinForms 8
loading
Tags: GridControl
I Gusti Ngurah Wirawan
Asked On July 27, 2006 09:49 AM UTC

Hi,

I have a problem that i cannot solve, please advice me. My application does this behaviour, after checking the checkbox column it will move to the next cell and set a value to it. After moving to the next cell i call CurrentCell.ConfirmChanges so it will make CurrentCell.IsModified to false. but why when on deactivating cell triggerred the CurrentCell.IsModified becomes true. in my understanding it should still false.

Thanks in advance
Wirawan

Administrator [Syncfusion]
Replied On July 27, 2006 12:22 PM UTC

Hi Wirawan,

In general, If you call ConfirmChanges directly the current cell will remain in edit mode. Only CurrentCell.IsModified will be reset and changes are saved to the underlying style object. The attached sample implements the confirmchanges method. It works fine on my system which has " Essentail studio 4.2 + .Net Framework 1.1 And 2.0 + XP sp2" installed, and I am not able to see the mentioned issue here. Can you able to see the issue in the attached sample? Or can you please tell me how to reproduce the issue in the attached sample so that we can get back soon with a solution at the earliest.

Here is a sample.
http://www.syncfusion.com/Support/user/uploads/GDBGIsModified_575c760c.zip

Thanks,
Haneef

I Gusti Ngurah Wirawan
Replied On July 28, 2006 01:48 AM UTC


Thanks for your response Haneef,
I have attached the modified code here and I can replicate the issue on it.
Please advice me.

Regards,
Wirawan

GDBGIsModified.zip

Administrator [Syncfusion]
Replied On July 28, 2006 04:50 AM UTC

Hi Wirawan,

Try calling the CurrentCell.Deactivate method before move the currentcell to right.

gridDataBoundGrid1[gridDataBoundGrid1.CurrentCell.RowIndex, 6].Text = "1000";
gridDataBoundGrid1.CurrentCell.Deactivate(false);
gridDataBoundGrid1.CurrentCell.MoveRight();
gridDataBoundGrid1.CurrentCell.ConfirmChanges();

Let me know if this helps.
Regards,
Haneef

I Gusti Ngurah Wirawan
Replied On July 28, 2006 09:32 AM UTC

Hi Haneef,

I still found the same problem, please see in my attached file.

Regards,
Wirawan


GDBGIsModified-1.zip

Administrator [Syncfusion]
Replied On July 28, 2006 11:27 AM UTC

Hi Wirawan,

I have contacted the development team regarding this issue and will be updating you soon.

Thanks for your patience.

Best Regards,
Haneef

I Gusti Ngurah Wirawan
Replied On July 31, 2006 05:54 AM UTC

Thanks Haneef,

Cannot wait for the solution. :D

Regards,
Wirawan

Administrator [Syncfusion]
Replied On July 31, 2006 08:57 AM UTC

Hi Wirawan,

Our apologies for the delay in response.

Calling ConfirmChanges() does set the CurrentCell.IsModified flag to false. But in the sample the ConfirmChanges() is called in between the GridCheckBoxCellRenderer MouseUp and OnClickedCheckBox events and in the OnClikedCheckBox event again the IsModified flag is set to true by the NotifyChanged() call.

To resolve this issue, you need to handle the CurrentCellChanged event. Here is a code snippet

void gridDataBoundGrid1_CurrentCellChanged(object sender, EventArgs e)
{
if (gridDataBoundGrid1.CurrentCell.ColIndex == 6 && codeChange)
{
gridDataBoundGrid1.CurrentCell.ConfirmChanges();
gridDataBoundGrid1.CurrentCell.EndEdit();
gridDataBoundGrid1.Binder.EndEdit();
codeChange = false;
}
}

Here is a modified sample.
http://www.syncfusion.com/Support/user/uploads/GDBGIsModified-1_5a12bf13.zip

Let me know if this helps.
Best Regards,
Haneef

I Gusti Ngurah Wirawan
Replied On August 2, 2006 02:37 AM UTC

Thank you Haneef, It''s working.

Regards,
Wirawan

CONFIRMATION

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.

Warning Icon 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.Close Icon

;