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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Setting ListBoxSelectionMode in a GridDataBoundGrid

Thread ID:





4248 May 5,2003 01:11 PM UTC May 5,2003 03:37 PM UTC WinForms 2
Tags: GridControl
Kenneth Johnson
Asked On May 5, 2003 01:11 PM UTC

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? Thanks. Ken

Administrator [Syncfusion]
Replied On May 5, 2003 03:22 PM UTC

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.

Kenneth Johnson
Replied On May 5, 2003 03:37 PM UTC

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. Later. Ken


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon