Cell type on mouse click

Hi, Please can to guide me how to get cell type on mouse click.

void Grid_MouseClick(object sender, MouseEventArgs e)
{}

regards,

1 Reply

HA haneefm Syncfusion Team June 5, 2007 03:32 PM UTC

Hi Ali,

You can try these code:

void gridControl1_MouseClick(object sender, MouseEventArgs e)
{
GridControl _grid = sender as GridControl;
int _irowIndex, _icolIndex;
bool _bisInsideGrid = _grid.PointToRowCol(e.Location, out _irowIndex, out _icolIndex);
if (_bisInsideGrid)
{
Console.WriteLine(" CellType =>" + _grid.Model[ _irowIndex , _icolIndex ].CellType );
}
}

Best regards,
Haneef

Loader.
Up arrow icon