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

StackOverFlow Exception

Hi, 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. Thanks, Ben Lamb. StackTrace_9046.zip

2 Replies

AD Administrator Syncfusion Team September 24, 2004 09:45 AM UTC

Hi Ben, 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. Stefan

AD Administrator Syncfusion Team September 24, 2004 10:41 AM UTC

Hi Stefan, Thanks for your quick reply and explanation. I''ve implemented it and it fixes the problem. Best regards, Ben.

Live Chat Icon For mobile
Up arrow icon