AD
Administrator
Syncfusion Team
January 31, 2007 12:30 AM UTC
Here is a snippet that shows 2 ways to do this.
void gridGroupingControl1_TableControlMouseDown(object sender, GridTableControlMouseEventArgs e)
{
Point pt = new Point(e.Inner.X, e.Inner.Y);
Element el = e.TableControl.PointToNestedDisplayElement(pt);
if (el is GridRecordRow)
{
GridRecordRow grr = el as GridRecordRow;
Console.WriteLine( grr.GetRecord().GetValue("Col1")); //some field
}
int row, col;
if (e.TableControl.PointToRowCol(pt, out row, out col))
{
GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(row, col);
GridRecordRow grr = style.TableCellIdentity.DisplayElement as GridRecordRow;
if (grr != null)
{
Console.WriteLine(grr.GetRecord().GetValue(style.TableCellIdentity.Column.Name)); //clicked field
}
}
}