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.
Syncfusion Feedback

Cancel a row edit

Thread ID:

Created:

Updated:

Platform:

Replies:

20625 Oct 21,2004 05:56 PM UTC Oct 21,2004 06:59 PM UTC Windows Forms 1
loading
Tags: GridControl
Chris Thompson
Asked On October 21, 2004 05:56 PM UTC

I have an issue with canceling an edit of a row in a data bound grid. I have a dataset table bound to a grid. If I edit a cell in the grid and move to another editable cell in the same row I cannot cancel that edit. I see the “pencil” icon for that row. However, if I move to a read only cell in that same row or to another row, I can cancel the edit. What I am doing is rejecting the changes in the dataset for the row I am editing: dsData.TABLE_NAME.Rows(grid.CurrentCell.RowIndex - 1).RejectChanges() If I run this code while the row is in edit mode you do not see and changes in the grid until you move off the row. Then you see the edited cells roll back. How can I get the grid to cancel the row edit so I see the roll back in the grid when I reject the changes for the row in the dataset?

Administrator [Syncfusion]
Replied On October 21, 2004 06:59 PM UTC

Try this code. this.grid1.CurrentCell.EndEdit(); this.1.Binder.EndEdit(); dateTable1.Rows[this.grid1.CurrentCell.RowIndex-1].RejectChanges();

CONFIRMATION

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.

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

;