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.

GridControl - mouse

Thread ID:

Created:

Updated:

Platform:

Replies:

24783 Feb 10,2005 11:59 AM Feb 10,2005 06:57 PM Windows Forms 1
loading
Tags: GridControl
Stefan Tsalapatis
Asked On February 10, 2005 11:59 AM

Hi, In a Virtual Grid . I use custom renderers based on GridStatic and I handle all the keys through ProcessCmdKey of the custom control. But I can not handle the mouse from the renderer before another cell is activated. (I don''t want to use the lostfocus or current cell moving for this reason ) Is there any way to know and handle when the mouse is to activate another cell before the events? Regards Stefan

Administrator [Syncfusion]
Replied On February 10, 2005 06:57 PM

The CellClick is raised before the cell is activated. The code that activates the current cell can actually be found in GridCellRendererBase: /// /// This is called from GridSelectCellsMouseController when the user clicked inside a cell. /// /// The row index. /// The column index. /// A with data about the mouse event. protected virtual void OnClick(int rowIndex, int colIndex, MouseEventArgs e) { scrolledInfo = Point.Empty; Grid.WindowScrolled += new ScrollWindowEventHandler(GridWindowScrolled); if (Grid.CurrentCell.HasCurrentCellAt(rowIndex, colIndex)) Grid.CurrentCell.ScrollInView(GridScrollCurrentCellReason.Click); else Grid.CurrentCell.MoveTo(rowIndex, colIndex, GridSetCurrentCellOptions.ScrollInView); Grid.WindowScrolled -= new ScrollWindowEventHandler(GridWindowScrolled); } This method is called after the CellClick event. So, you have the option to either handle CellClick or override OnClick in your derived renderer. Stefan >Hi, >In a Virtual Grid . >I use custom renderers based on GridStatic and I handle all the keys through ProcessCmdKey of the custom control. >But I can not handle the mouse >from the renderer before another cell >is activated. >(I don''t want to use the lostfocus or >current cell moving for this reason ) > >Is there any way to know and handle >when the mouse is to activate another >cell before the events? > >Regards >Stefan > > >

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.

;