I have a grid that is derived from a GDBG. A method is hooked to the RowsDeleting grid event in order to display a "Are you sure?" type dialog. I have used this derived grid successfully on a few dialogs with great success. We have one grid that the ListBoxSelectionMode property in set to one. One that grid, the grids RowsDeleting event is hit when the user selects the text in a TextBox and attempts to delete the text in the cell. This only happens when the ListBoxSelectionMode is set to one. Any ideas what is happening?
ADAdministrator Syncfusion Team May 5, 2003 10:22 AM
The problem is that with ListboxMode set, the row is always selected even if you are editing a cell. So, when a delete key is seen, there is a selected row, so the grid deletes it.
I think this is something that is more easily fixed in our source. I'll pass the problem onto Stefan to see what he thinks.
One way to work around it is to temporarily remove the selection when the delete key is pressed. You can do this in a ProcessDialogKey override. Then you could handle OnCurrentCellChanged, and re-select the row if teh selection is missing.
KJKenneth JohnsonMay 5, 2003 10:37 AM
Actually, the dialog in question was not originally written by me. I was working on something else and noticed the behavior. The grid should have been extended select and I have since revised it. Just thought that you would want to know about the single select problem.