Just use the built-in methods, each taking a coordinate.
Example, get the clicked cell in an overridden MouseDown
event:
protected override void OnMouseDown(MouseEventArgs e)
{
Int32 row = RowContaining(e.Y);
Int32 col = ColContaining(e.X);
}
Or, if you have a reference to the grid, the same thought applies:
Int32 row = Grid.RowContaining(yCoord);
Int32 col = Grid.ColContaining(xCoord);
You can also use the Point
with ComponentOne's PointAt
method to identify the clicked region:
C1.Win.C1TrueDBGrid.PointAtEnum ptEnum - Grid.PointAt(e.X, e.Y);