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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to use the PointToRowCol() method in WinForms GridGroupingControl?

Platform: WinForms |
Control: GridGroupingControl

Use of PointToRowCol method

To retrieve the row and column index from the mouse position, the PointToRowCol() method can be used. In the below example, the row, column indices are taken from the mouse down point.


this.gridGroupingControl1.TableControl.MouseDown += TableControl_MouseDown;
void TableControl_MouseDown(object sender, MouseEventArgs e)
   System.Drawing.Point _Ponto;
   _Ponto = new System.Drawing.Point(e.X, e.Y);
   int row, col;
   gridGroupingControl1.TableControl.PointToRowCol(_Ponto, out row, out col);
   MessageBox.Show("Row :" + row + "\n" + "Col   :" + col);


Private Me.gridGroupingControl1.TableControl.MouseDown += AddressOf TableControl_MouseDown
Private Sub TableControl_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs)
   Dim _Ponto As System.Drawing.Point
   _Ponto = New System.Drawing.Point(e.X, e.Y)
   Dim row, col As Integer
   gridGroupingControl1.TableControl.PointToRowCol(_Ponto, row, col)
   MessageBox.Show("Row :" & row + Constants.vbLf & "Col   :" & col)
End Sub


Show the row and column count


C#: PointToRowCol

VB: PointToRowCol

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile