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. Image for the cookie policy date
close icon

GridControl Cell Changes not being Saved

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

3 Replies

AD Administrator 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.


AD Administrator 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


AD Administrator Syncfusion Team February 23, 2006 01:36 AM UTC

I found the CellChanged event that appears to do the trick. Domenick

Loader.
Live Chat Icon For mobile
Up arrow icon