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.

HandleBoundCurrentCellKeyDown IsEditing

Thread ID:





46003 Jul 4,2006 03:22 AM Jul 4,2006 11:37 AM Windows Forms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On July 4, 2006 03:22 AM

Hi there, In GridDataBoundGrid protected override void HandleBoundCurrentCellKeyDown(KeyEventArgs e) { ... else if(e.KeyCode == Keys.Escape && this.CurrentCell.IsEditing && this.CurrentCell.Renderer.CurrentStyle.CellType == FormulaCell) { CurrentCell.RejectChanges(); //CurrentCell.ConfirmChanges(); //only ConfirmChanges will make the CurrentCell.IsEditing = false; CurrentCell.CancelEdit(); CurrentCell.EndEdit(); //CancelEdit and EndEdit is not making the IsEditing false. e.Handled = true; Focus(); } } Can you please suggest how to make IsEditing false in this function because it is again calling the CurrentCell.ConfirmChanges from the base when the another cell is selected. Thank you, Nevin

Administrator [Syncfusion]
Replied On July 4, 2006 03:42 AM

hi, In the above mail the CurrentCell.IsEditing is getting false. But still the grid is calling the Model_SaveCellInfo when the other cell is selected. Can you please suggest something which helps in not calling the Model_SaveCellInfo. Thank you again, Nevin

Administrator [Syncfusion]
Replied On July 4, 2006 11:37 AM

Hi Nevin, Typically this types of error occurs if you are not properly handle CurrentCell.IsModified flag. Without setting the CurrentCell.IsModified = false, your saveCellInfo is called when you leave the cell/the control which means your changes were being saved in the grid. Before calling the CurrentCell.RejectChanges/ AcceptChanges method, you can set the CurrentCell.IsModified flag to false. Here is a code snippet. this.CurrentCell.IsModified = false; this.CurrentCell.RejectChanges(); Let me know if this helps. Best Regards, Haneef


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.