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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Cell type on mouse click

Thread ID:

Created:

Updated:

Platform:

Replies:

61969 Jun 5,2007 02:46 PM UTC Jun 5,2007 03:32 PM UTC WinForms 1
loading
Tags: GridControl
Faheem Rauf
Asked On June 5, 2007 02:46 PM UTC

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

void Grid_MouseClick(object sender, MouseEventArgs e)
{}

regards,

haneefm [Syncfusion]
Replied On 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

CONFIRMATION

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.

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

;