Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
24783 | Feb 10,2005 04:59 PM UTC | Feb 10,2005 11:57 PM UTC | WinForms | 1 |
![]() |
Tags: GridControl |
///
/// 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
>
>
> 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.
This page will automatically be redirected to the sign-in page in 10 seconds.