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 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
ADAdministrator Syncfusion Team July 4, 2006 07:42 AM UTC
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
ADAdministrator Syncfusion Team July 4, 2006 03:37 PM UTC
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