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 sorting with Binder.DirectSaveCellInfo enabled

Thread ID:

Created:

Updated:

Platform:

Replies:

79785 Feb 25,2009 03:42 PM Feb 28,2009 03:13 AM Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On February 25, 2009 03:42 PM

I am seeing some weird behavior with a GridDataBoundGrid that has sorting enabled on a field and Binder.DirectSaveCellInfo is enabled.

For some reason, if I press Enter in a cell (after making a change to a cell that would move it to a new row, because of sorting), it will change the value of the cell for that row and the row below it. Note: this only occurs if the Enter key is pressed and not Tab or one of the arrow keys.

For example, if I am sorting a table on a Name field, and I have four names configured (aa, bb, cc, dd). If I change the name of cc to ba and press the Enter key, the name of bb will also change to ba. Again, this only happens when I leave the cell by pressing the Enter key.


Nisha Arockiya A [Syncfusion]
Replied On February 27, 2009 07:46 AM

Hi Michael,

Thanks for your interest in Syncfusion Products.

The above stated behaviour is due to sorting enabled in the column. This can be avoided by modifying the changes when ever it leaves the cell.

If you want the change to be pushed to the datasource when you leave the cell (as opposed to when you leave the row), try handling CurrentCellAcceptedChanges and ending the binder edit there.

Here is the code snippet.

private void gridDataBoundGrid1_CurrentCellAcceptedChanges(object sender, CancelEventArgs e)
{
this.gridDataBoundGrid1.Binder.EndEdit();
}


Please try and let me know if this helps.

Regards,
Nisha.



Administrator [Syncfusion]
Replied On February 27, 2009 03:10 PM

I still get the same issue as long as Binder.DirectSaveCellInfo is enabled. However, I'll try disabling it.


Nisha Arockiya A [Syncfusion]
Replied On February 28, 2009 03:13 AM

Hi Michael,

Thanks for the Update.

Waiting to hear from you.

Regards,
Nisha.


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.

;