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.

griddataboundgrid leave problem when cell is still in edit mode

Thread ID:

Created:

Updated:

Platform:

Replies:

91764 Dec 1,2009 10:04 AM Dec 2,2009 05:15 AM Windows Forms 1
loading
Tags: GridControl
Laszlo "Laci" Kovari
Asked On December 1, 2009 10:04 AM


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

Ranjeet Kumar [Syncfusion]
Replied On December 2, 2009 05:15 AM

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

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.

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.

;