The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
How do I get the position of CurrentCell''s rowIndex from a datarow of the datasource with GridGroupingControl ?
I use syncfusion library 3.0.1.0
Thank of everything
ADAdministrator Syncfusion Team April 19, 2005 02:56 PM UTC
To get the rowindex in the grid, you need to look up the corresponding Record, rec, using grid.Table.DisplayElements.IndexOf(rec).
To actually get the record you need, you have some options depending upon what you know. If you already know the position of the datarow in the DataTable, you can get the record using
Record rec = this.gridGroupingControl1.Table.UnsortedRecords[position];
If you have a primary key for your datatable, you can use
int i = this.gridGroupingControl1.Table.PrimaryKeySortedRecords.IndexOf("keyvalue");
Record rec = this.gridGroupingControl1.Table.FilteredRecords[i];
Again, once you have the record, you can use grid.Table.DisplayElements.IndexOf to get the index.