In Syncfusion''s grid when one doubleclik on a combo box cell, the value changes to the next one on the list. Although this can be useful for short list, for long one (20+ items) this is potentially dangerous since a user can change data unexpectedly.
How can you disable this default behavior?
ADAdministrator Syncfusion Team May 4, 2004 08:50 AM
You would have to derive your own combobox cell from GridComboBoxCellModel and GridComboBoxCellRenderer. In the renderer class, override OnEditPartMouseDown and do not call the base class.
Here is a little sample.
CMChristian MorandMay 5, 2004 03:09 AM
Is there something simple?
Right now, I do not think I will have time to implement this solution (BTW sorry I did not told you I work with VB.NET). If I have to do that everywhere there is a combobox in my code, I might as well switch to another grid.
>You would have to derive your own combobox cell from GridComboBoxCellModel and GridComboBoxCellRenderer. In the renderer class, override OnEditPartMouseDown and do not call the base class.
>Here is a little sample.
ADAdministrator Syncfusion Team May 5, 2004 06:48 AM
There is no property that controls this.
The clicking in being handled down in the cell''s active control, so it is buried deep. Trying to catch clicks at teh grid level does not catch this action. Hence, the reason the work-around involves deriving the cell control.
Here is that sample in VB. In any grid where you wanted some comboboxes that did not have this double click, you would to include this code. (Or, you could derive a grid, and add this custom cell types to your derived grid''s CellModels collection. Then when you wanted a grid to have comboboxes that do not respond to a double click, you can use your derived grid class instead of our grid class).