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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridControl Cell Changes not being Saved

Thread ID:





41055 Feb 21,2006 04:24 PM UTC Feb 23,2006 01:36 AM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On February 21, 2006 04:24 PM UTC

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

Administrator [Syncfusion]
Replied On 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.

Administrator [Syncfusion]
Replied On 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

Administrator [Syncfusion]
Replied On February 23, 2006 01:36 AM UTC

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


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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