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

DoubleClick on ComboBox in Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

13608 May 4,2004 04:37 AM May 5,2004 06:48 AM Windows Forms 3
loading
Tags: GridControl
Christian Morand
Asked On May 4, 2004 04:37 AM

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

Administrator [Syncfusion]
Replied On 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. DerivedComboBoxCell_7325.zip

Christian Morand
Replied On May 5, 2004 03:09 AM

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

Administrator [Syncfusion]
Replied On 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). DerivedComboBoxCell_VB_160.zip

CONFIRMATION

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.

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.

;