Hi Emma,
Thanks for using Syncfusion products.
As per the grid architecture, the GridCellClickEventHandler does not hold the graphics of CurrentCell and you can create the graphics for the grid in CellClick event using CreateGraphics() method. If you want to get the cell rectangle and location, the RangeInfoToRectangle() method of the current cell and Location property of MouseEventArguments can be used. Please refer to the below code sample,
Code example
|
//Event Triggering
this.gridControl1.CellClick += GridControl1_ CellClick;
//Event Customization
private void GridControl1_CellClick(object sender, GridCellClickEventArgs e)
{
Graphics g = this.gridControl1.CreateGraphics();
//To get the client rectangle of current cell
Rectangle cellRectangle =this.gridControl1.RangeInfoToRectangle(GridRangeInfo.Cell(e.RowIndex,e.ColIndex));
//To get the cursor position of current cell
Point mousePointLocation = e.MouseEventArgs.Location;
}
|
Please let us know if you have any other queries.
Regards,
Arulpriya