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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

handling events for an inactive cell that has a custom control

Thread ID:





97118 Oct 29,2010 10:00 AM UTC Nov 9,2010 06:13 AM UTC ASP.NET Web Forms (Classic) 1
Tags: GridGroupingControl
Raul Rosenthal
Asked On October 29, 2010 10:00 AM UTC

I have a grid that uses a user control to render its cells.
I implemented all the required magic, with a cell model derived from GridGenericControlCellModel and a renderer derived from GridGenericControlCellRenderer.

I can't figure out how to make the cell handle events that don't require the cell to be selected, such as MouseWheel.
When the cell is selected, there is a real control active in it, and it receives the necessary events.
When the cell is not selected, it is just a picture generated internally by the grid using the same instance of my control for all the cells, so there is nobody to received the events.

I think I should handle the events in the renderer (as shown in the Derived Cell Contro Tutorial sample), but I don't know how.
Moreover, there is no OnMouseWheel method that I can override in the renderer, so I'm stuck.

Can you please point me in the right direction?


Yuvaraja V [Syncfusion]
Replied On November 9, 2010 06:13 AM UTC

Hi Raul,
Thank you for using Syncfusion Products.

In Renderer only certain mouse events are to be supported.

In Cell Renderer we can handle the OnMouseWheel() events only in controls.

protected override void OnMouseWheel(MouseEventArgs e)
Console.WriteLine("OnMouseWheel() is raised");

But we can the MouseEvents like

OnMouseDown(int rowIndex, int colIndex, System.Windows.Forms.MouseEventArgs e)
OnMouseUp(int rowIndex, int colIndex, System.Windows.Forms.MouseEventArgs e),
OnMouseHoverEnter(int rowIndex, int colIndex),
OnMouseHoverLeave(int rowIndex, int colIndex, System.EventArgs e),...
are handled without selecting the cell.

For Ex: protected override void OnMouseDown(int rowIndex, int colIndex, System.Windows.Forms.MouseEventArgs e)
base.OnMouseDown(rowIndex, colIndex, e);
DrawLink(true, rowIndex, colIndex);
_isMouseDown = true;

Here is the link for the sample,

Yuvaraja V


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon