Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
UltraComboEditor and disable mouse scroll button
posted

Hi,

I have a grid with an UltraComboEditor inside. When I select my UltraComboEditor component I can scroll and select a value but just after, when I scroll I would like to scroll into my grid rather than into my UltraComboEditor. Is there a property on UltraComboEditor to disable mouse scroll button after having selected a value ? Any idea ?

Thank you very much.

Nic

  • 69832
    Offline posted

    I didn't try this so I can't promise it will work, but EditorWithCombo just happens to expose a virtual method, 'OnTextBoxMouseWheel', which you can override if you derive a class from EditorWithCombo and embed that in the grid instead of the UltraComboEditor control. Instead of setting the column's EditorControl property, you would assign an instance of your derived editor to the Editor property. In the OnTextBoxMouseWheel implementation, check this.IsDroppedDown (and/or whatever other criteria you have) and if you want to "cancel" the wheeling on the editor, upcast the MouseEventArgs instance to a HandledMouseEventArgs, and set the Handled property to true. This will cause the editor to forego its mouse wheel logic, and by doing that, the grid will know to process it.

  • 469350
    Offline posted

    Hi Nic,

    No, I think the only way to do this would be to take the cell out of edit mode. So you could maybe call PerformAction(ExitEditMode) on the grid. I'm not sure when you would do this, though.