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

griddataboundgrid leave problem when cell is still in edit mode


Hello,

It's probably quite straightforward or trivial, but I couldn't find an answer after a few hours of trying and searching.

I have a list of custom objects (implementing BindingList) bound to a griddataboundgrid. the user is allowed to change more objects at the same time and need to press a save button outside the grid when finished.

The issue is that if they add a new record and click the save button while the last cell is still being "edited" (i.e. with double cellvaluetype), the new row is removed. I have tried catching the grid_leave event and calling the binder.EndEdit, catching the grid_validating and EndEdit the currentcell, but they did not work.

Any help is appreciated.

thanks,

Laci

1 Reply

RK Ranjeet Kumar Syncfusion Team December 2, 2009 10:15 AM UTC

Hi Laci,

Thanks for your interest in Syncfusion Products.

In the attached sample, GridDataBoundGrid is binded with list of custom objects using BindingList. While trying to save the new record added which is in edit mode through a button click event, it is getting saved by rebinding the datasource to grid.

//Event button1_Click
gridBindingList.Add(new CustomClass(0010, "Barac", "umar", "BCD", "cityname",60000));

gridDataBoundGrid1.DataSource = gridBindingList;


http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=GDBC_UpdateAndAdd-787675697.zip

Regards,
Ranjeet

Loader.
Live Chat Icon For mobile
Up arrow icon