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.

Mistaken behavior while editing

Thread ID:

Created:

Updated:

Platform:

Replies:

92667 Jan 29,2010 05:01 AM Feb 1,2010 05:57 AM Windows Forms 3
loading
Tags: GridControl
Plotnikova
Asked On January 29, 2010 05:01 AM

Hello,

I'm using GridGroupingControl. My Grid contains more then one column.

The datasource is a binding list. The elements of the binding list fire a Change event if one of the properties was changed. The binding list registers these events and fires OnListChanged.

If more than one cells were edited without leaving the row, the grid view writes only the first modified value back to the model.

My opinion is:
If an OnListChanged event is fired during the SaveChanges procedure, the CurrentRecordManager will reread cell values from the model - which has not been saved completely yet (only one value was saved). This will discard all user changes (except the first) and cause an inconsistent view.

Result:
- objects in the model can be inconsistent (validations were applied to user changes - not to the incompletely saved data) and will not be shown as erroneous to the user
- when focusing different rows: the complete (but unsaved) user
modifications are shown for unfocused rows; the actual domain object state (including partially saved user modification) is shown at the focused row.

I have attached the example project.
Do you see this behavior also as a bug? Could you resolve it please.

Thank you.




WindowsFormsApplication4_42883138.zip

Jisha Joy [Syncfusion]
Replied On February 1, 2010 03:00 AM

Hi Plotnikova,

In the GridGroupingControl, the cells are saved recordwise. That is, the cells do not reflect any changes to the datasource unless, the cells move to next record or the record is EndEdited. For manually EndEditing the record when the cells is edited by handling the RecordValueChanged event. The code snippet is as follows.

void ggc_RecordValueChanged(object sender, RecordValueChangedEventArgs e)
{

e.Record.EndEdit();

}

Please let me know if this helps.

Regards,
Jisha

Plotnikova
Replied On February 1, 2010 05:37 AM

Hi Jisha,

thank you so much.
It works.

Best Regards

Jisha Joy [Syncfusion]
Replied On February 1, 2010 05:57 AM

Thank You for Your Update.

Thanks,
Jisha

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.

;