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.

TableControlCellClick

Thread ID:

Created:

Updated:

Platform:

Replies:

58097 Mar 18,2007 08:59 AM Mar 19,2007 11:53 AM Windows Forms 1
loading
Tags: GridControl
NIBBLER
Asked On March 18, 2007 08:59 AM

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?


Administrator [Syncfusion]
Replied On March 19, 2007 11:53 AM

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

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.

;