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

GridControl: Inner exception after press DELETE key

Hello ! I have virtual grid, implemented via GridControl. After pressing DELETE key on focused cell, the following shows in output: catched at Syncfusion.Windows.Forms.Grid.GridModel.SetCellInfo(Int32 rowIndex, Int32 colIndex, GridStyleInfo style, StyleModifyType modifyType, Boolean dontRaiseSaveCellInfoEvent, Boolean copyReferenceOnly) in :line 0 catched at Syncfusion.Windows.Forms.Grid.GridModel.ClearCells(GridRangeInfoList rangeList, Boolean clearStyle) in :line 0 I already ask you same question, when I was implementing Drag and Drop, but how to avoid it here, after pressing button ? Thanks. Vadim.

3 Replies

AD Administrator Syncfusion Team August 19, 2004 12:59 AM

Without a working sample to look at, the only thing I can do is guess at what is causing this problem. If you can provide a sample showing the problem, we can try to debug it here and possibly give you better advice. It looks like the problem is in trying to clear a cell that has a bool value. Is your data source a DataTable or something that has a bool values in it. And if so, does your datasource allow the value to be null? If not, then you should not allow clearing of these cells. One way to prevent it, is to handle the ClearingCells event and set e.Handled = true and e.Result = false when e.RangeList intersects with your bool cells.

AD Administrator Syncfusion Team August 23, 2004 02:31 AM

It work for but the problem appeared for me again in GridListControl :( I have context menu with Delete option (delete row), either deletion available via Key. In Delete Key handler I just call menuDel.performClick. Delete means delete single row in datatable, that is datasource for GridListControl. The strange effect: when I press delete button, grid catch exceptions, that were described above, when I choose delete via context menu, all is OK. The GridListControl haven''t ClearCells event :(

AD Administrator Syncfusion Team August 23, 2004 03:53 AM

GridListControl.Grid has a ClearingCells event.

Live Chat Icon For mobile
Up arrow icon