|106916||Jan 31,2013 01:03 PM||Feb 5,2013 07:09 AM||Windows Forms||1|
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;
int index = this.gridGroupingControl1.Table.Records.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 =
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.
Please let me know if you have any other concerns.
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.