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

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.


3 Replies

NA Nisha Arockiya A Syncfusion Team February 27, 2009 12:46 PM UTC

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.




AD Administrator Syncfusion Team February 27, 2009 08:10 PM UTC

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



NA Nisha Arockiya A Syncfusion Team February 28, 2009 08:13 AM UTC

Hi Michael,

Thanks for the Update.

Waiting to hear from you.

Regards,
Nisha.


Loader.
Live Chat Icon For mobile
Up arrow icon