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

Raise Row/Cell Click event

Thread ID:





130844 Jun 7,2017 05:08 AM UTC Jun 8,2017 01:37 PM UTC WinForms 1
Tags: GridGroupingControl
Tran Thanh Phong
Asked On June 7, 2017 05:08 AM UTC

How can I raise Row/Cell Click event in the grid grouping control programmatically?

Arulpriya Ramalingam [Syncfusion]
Replied On June 8, 2017 01:37 PM UTC

Hi Tran, 
Thanks for your interest in Syncfusion products. 
In order to raise the TableControlCellClick event programmatically, the FakeLeftMouseClick() and ProcessTableClickCellsMouseDown() methods can be used. Please make use of below code and sample, 
Code snippet 
//To pass the cell range to perform the click event 
Rectangle rect = this.gridGroupingControl1.TableControl.RangeInfoToRectangle(GridRangeInfo.Cell(5,5)); 
int row, col; 
this.gridGroupingControl1.TableControl.PointToRowCol(rect.Location, out row, out col); 
//To get the current cell renderer 
GridTextBoxCellRenderer ren = this.gridGroupingControl1.TableControl.GetCellRenderer(row, col) as GridTextBoxCellRenderer; 
//Hooking the cell click event programmaticlly 
Syncfusion.Drawing.ActiveXSnapshot.FakeLeftMouseClick(gridGroupingControl1.TableControl, new System.Drawing.Point(rect.X, rect.Y)); 
this.gridGroupingControl1.TableControl.ProcessTableClickCellsMouseDown(new GridTableClickCellsEventArgs(gridGroupingControl1.TableControl, ren, new MouseEventArgs(MouseButtons.Left, 1, rect.X, rect.Y, 0))); 
//Event triggering 
this.gridGroupingControl1.TableControlCellClick += GridGroupingControl1_TableControlCellClick; 
//Event customization 
private void GridGroupingControl1_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e) 


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