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

EndEdit - AcceptChanges - ConfirmChanges

Thread ID:

Created:

Updated:

Platform:

Replies:

37945 Dec 2,2005 03:44 PM UTC Dec 2,2005 06:19 PM UTC Windows Forms 4
loading
Tags: GridControl
Martin Cyr
Asked On December 2, 2005 03:44 PM UTC

I imlemented the IBindingList interface on a custom objects collection to be displayed in a GDBG. My problem is when it comes to saving the data. How do I confirm the changes to the currently editing row? I tried the BindingContext.EndCurrentEdit, CurrentCell.ConfirmChanges, CurrentCell.EndEdit but nothing does stop the editing on the current row (the pen is still in the row marker). Any ideas?

Administrator [Syncfusion]
Replied On December 2, 2005 04:39 PM UTC

Try grid.CurrentCell.EndEdit();//saves the currentcell grid.binder.EndEdit(); //removes the pencil

Martin Cyr
Replied On December 2, 2005 05:07 PM UTC

Nope, pencil stays and object info is not saved.

Administrator [Syncfusion]
Replied On December 2, 2005 05:50 PM UTC

In the IBindingList sample we ship, Essential Studio\3.3.0.0\Windows\Grid.Windows\Samples\DataBound\Hierarchical\Customers, adding this event handler makes the pencil go away everytime you tab out of an edited cell. If you comment out the EndEdit call, the pencil stays as long as you are on the same row.
private void gridDataBoundGrid1_CurrentCellMoved(object sender, GridCurrentCellMovedEventArgs e)
{
	this.gridDataBoundGrid1.Binder.EndEdit();
}
Are you using 3.3? If you subscribe to CurrentCellMoved in our sample as above, does it work for you there? Can you upload a sample showing the problem?

Martin Cyr
Replied On December 2, 2005 06:19 PM UTC

My apologies, You were right from the beginning. The error was mine, while working on the problem, I had deleted and recreated the source object that does the call to grid.binder.endedit so VB.NET had removed the Handles instruction, so it simply never got fired. Again, my sincere apologies and as always thanks Clay for your invaluable help!

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

;