Hi Cristiano,
Thank you for your interest in Syncfusion Products.
We have analyzed your sample to get the record info. The
queryCellInfo event refer multiple time in GridGroupingControl. But you can get
the record info using the CurrentCelllClick event in GGC. The following
workaround is used to get the record info in GGC.
Normally in GGC the caption and group drop area also
included in row index. So we can’t able to get the record based on the
e.Inner.RowIndex. Because it refers the
another records. If we want to get the selected records by passing the index
means you could pass the record index based on the following code. Please refer
the following code.
void
gridGroupingControl1_TableControlCellClick(object
sender, GridTableControlCellClickEventArgs e)
{
GridTableCellStyleInfo style =
e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, e.Inner.ColIndex);
GridTableCellStyleInfoIdentity id = style.CellIdentity as
GridTableCellStyleInfoIdentity;
Element el = style.TableCellIdentity.DisplayElement;
GridCaptionRow gridCaptionRow = el as GridCaptionRow;
if
(gridCaptionRow != null)
{
Record
rec = gridCaptionRow.GetCaptionSection().ParentGroup.Records[0];
}
else
{
int index = this.gridGroupingControl1.Table.Records[0].GetRowIndex();
int selectedRecIndex =
e.Inner.RowIndex - index;
Record rec1 = this.gridGroupingControl1.Table.Records[selectedRecIndex];
// Get the record of first current selected
records if groups are collapsed.
//Record rec =
this.gridGroupingControl1.Table.CurrentRecord;
}
Please refer the attached sample file also for your
further reference. If you have any issue in this code. Please modify the
attached sample and please provide the steps to reproduce the issue.
http://www.syncfusion.com/downloads/Support/DirectTrac/103307/GGCgetgroup-729336051.rar
Please let me know if you have any other concerns.
Regards,
Vinish Kumar.