I''ve got a GridDataBoundGrid bound to a DataTable. The table is continuously updated in the background and the grid reflects the changes. Some columns on the grid are editable. If editing is completed by moving the current cell to a different row, e.g. by pressing the down arrow or clicking on another row with the mouse, everything is fine. If editing is completed by moving to a cell on the same row, e.g. by pressing the right arrow key, a StackOverFlowException occurs.
I don''t understand why this is occurring. Please can you tell me how to alleviate the problem?
Stack trace attached.
ADAdministrator Syncfusion Team September 24, 2004 04:45 AM
It''s that code when bindingList_ListChanged calls CancelEdit because the current record is modified from the outside and therefore the internal buffer changes are discarded. The problem is that during CancelEdit we again try to reset the values in the datsource which causes the StackOverflow.
We fixed that in our code base now.
But, you can define the behavior what bindingList_ListChanged should do in such situation and instruct it not to call CancelEdit.
To do this, set
gridDataBoundGrid1.Binder.DefaultCurrentRecordItemChangedBehavior = GridCurrentRecordItemChangedBehavior.KeepCurrentRecord;
or handle the OnCurrentRecordItemChanged event.
ADAdministrator Syncfusion Team September 24, 2004 05:41 AM
Thanks for your quick reply and explanation. I''ve implemented it and it fixes the problem.