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.

ProcessMouseWheel in ComboBoxCell

Thread ID:

Created:

Updated:

Platform:

Replies:

59560 Apr 17,2007 08:05 AM Apr 18,2007 11:11 AM Windows Forms 1
loading
Tags: GridControl
Hans Dampf
Asked On April 17, 2007 08:05 AM

I am wondering if it is possible to support the mouse wheel in a derived GridComboBoxCell. I have seen some implementations in the forum and tried these code snippets in my own class.

It looks something like this:

public override bool ProcessMouseWheel(MouseEventArgs e)
{
if (this.IsDroppedDown)
{
if (e.Delta < 0)
this.ListBoxPart.TopIndex++;
else
his.ListBoxPart.TopIndex--;
return true;
}
return false;
}

The function is called, but nothing happens?

Thanks,
George

haneefm [Syncfusion]
Replied On April 18, 2007 11:11 AM

Hi George,

You need to create a custom celltype. It requires a model class and a renderer class. The model class handles the serialization requirements for the control and creates the renderer class. The renderer class handles the UI requirements of the cell. This sample in \Syncfusion\Essential Studio\4.1.0.10\windows\Grid.Windows\Samples\In Depth\DerivedCellControlTutorial can be referred.

After creating the custom celltype, it has to be registered through CellModels.Add

this.gridControl1.CellModels.Add("MyComboBox", new MyComboBoxCellModel(this.gridControl1.Model));

Then you may use
style.CellType = "MyComboBox";

Please refer to the attachment for implemention.
ComboBoxMouseWheel.zip


Best regards,
Haneef

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.

;