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.
We have built an application using the Grid Control. The data in the grid is written to a database upon a user executed menu item. When the user edits the grid using ctrl-c, ctrl-v, ctrl-x and also the Find/Replace dialog, the changes are shown on the screen but not committed to the cell. So when the user saves the project to the database, the changes are lost. How do you get the default behavior for these editing changes to be always committed?
Domenick
ADAdministrator Syncfusion Team February 22, 2006 11:26 AM UTC
Hi Domenick,
Try calling this.gridControl1.CurrentCell.EndEdit() method before saving the changes into the database and let us know if it helps.
Below is the code snippet to resolve the issue.
private void gridControl1_Leave(object sender, EventArgs e)
{
if(this.gridControl1.CurrentCell.IsEditing)
this.gridControl1.CurrentCell.EndEdit();
}
Best Regards,
Madhan.
ADAdministrator Syncfusion Team February 23, 2006 12:24 AM UTC
Thanks for the reply. The fix does not seem to help. I think I understand why it is not working but need your help for the fix. We are marking cells that are updated using a .Tag property for each cell. The .Tag is populated during the CurrentCellChange event.
However, when a user cuts and pastes a range, the CurrentCellChange event is not firede for every cell in the range being updated. This results in the Tag not being set and therefore the database is not updated.
Is there an event that fires for every cell in the pasted range? If the user copies and pastes an area of 5columns by 10 rows (=50 cells) we would like to mark each cell as changed with a tag. Can this be done?
Domenick
ADAdministrator Syncfusion Team February 23, 2006 01:36 AM UTC
I found the CellChanged event that appears to do the trick.
Domenick