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
close icon

DoubleClick on ComboBox in Grid

Hi. 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? Thanks. Chris

3 Replies

AD Administrator Syncfusion Team May 4, 2004 12:50 PM UTC

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. DerivedComboBoxCell_7325.zip


CM Christian Morand May 5, 2004 07:09 AM UTC

Thanks Clay. 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. Regards Chris >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. > >DerivedComboBoxCell_7325.zip > >


AD Administrator Syncfusion Team May 5, 2004 10:48 AM UTC

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). DerivedComboBoxCell_VB_160.zip

Loader.
Live Chat Icon For mobile
Up arrow icon