|
if (this.gridGroupingControl1.Table.CurrentRecord != null)
{
Record record = this.gridGroupingControl1.Table.CurrentRecord;
int recordIndex = this.gridGroupingControl1.Table.Records.IndexOf(record);
} |
Hi Josip,Thanks for using Syncfusion products.As per the GridGroupingControl architecture, the CurrentCell row index is calculated based on the HeaderRow, AddNewRecordRow and FilterBarRoware added in the grid. Hence, the RowIndex of CurrentCell is varies from the Index of the CurrentRecord in underlying data source. You can retrieve the current cell elements from the DisplayElements collection for that particular current cell row index. Please refer to below KB to retrieve the current cell DisplayElements,Moreover, you can retrieve the record index (i.e. the index in underlying datasource) from the Records collection for the CurrentRecord. Please make use of below code,Code snippet
if (this.gridGroupingControl1.Table.CurrentRecord != null){Record record = this.gridGroupingControl1.Table.CurrentRecord;int recordIndex = this.gridGroupingControl1.Table.Records.IndexOf(record);}Regards,Arulpriya