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

EndEdit - AcceptChanges - ConfirmChanges

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?

4 Replies

AD Administrator Syncfusion Team December 2, 2005 04:39 PM UTC

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


MC Martin Cyr December 2, 2005 05:07 PM UTC

Nope, pencil stays and object info is not saved.


AD Administrator Syncfusion Team 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?


MC Martin Cyr 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!

Loader.
Live Chat Icon For mobile
Up arrow icon