>Hi John,
Thank you for using Syncfusion products.
You could get the DisplayElement in GridCaptionRow instead of GridCaptionSection, which is used to get rows of the group caption. Below is the code snippet:
if (e.Inner.MouseEventArgs.Button == MouseButtons.Left)
{
GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, e.Inner.ColIndex);
Element el = style.TableCellIdentity.DisplayElement;
GridCaptionRow gcr = style.TableCellIdentity.DisplayElement as GridCaptionRow;
if (gcr != null)
{
string s = "";
foreach (Record rec in gcr.GetCaptionSection().ParentGroup.Records)
{
s += "Id: " + rec.GetValue("id").ToString() + "Item: " + rec.GetValue("item").ToString() + " " + Environment.NewLine;
}
this.label1.Text = s.ToString();
}
}
Please refer to the sample available in the link below and let me know if it helps:
http://websamples.syncfusion.com/samples/Grid.Windows/F71736/main.htm Regards,
Subhasheela R
I don't understand but the cast of displayeLement to type GridCaptionRow works fine when invoked in TableControlCellClick but not when implemented in TableControlMouseDown. Why is the displayElement different for different events.
For TableControlMouseDown i get the row and column index via the point which is calculated on gridGroupingControl.TableControl.PointToRowCol function. What is the current function to get the valid row, col index for a given point then?