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. Image for the cookie policy date
close icon

TableControlCellClick

Hi.
I have a problem.

I'm using Syncfusion Essential GridGroupingControl 4.4.0.51. under .Net Framework 2.0 and encountered a problem with ContextMenu.
When it appears, it is bound to the previously selected cell, i.e., if cell [4,2] was active & I hover mouse over cell [5,6] and right-click, all functions are associated with cell [4,2].
How can I make a cell selected or active before the context menu appears or somehow fix this problem?


1 Reply

AD Administrator Syncfusion Team March 19, 2007 03:53 PM UTC

Hi NIBBLER,

You can handle the TableControlMouseDown event of the grid and move the current cell to required position in a grid. Here is a code snippet

private void gridGroupingControl1_TableControlMouseDown(object sender, GridTableControlMouseEventArgs e)
{
int row,col;
e.TableControl.PointToRowCol(new Point(e.Inner.X,e.Inner.Y),out row,out col);
if( row != -1 || col != -1)
e.TableControl.CurrentCell.MoveTo(row,col,GridSetCurrentCellOptions.SetFocus);
}

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon