We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Get CurrentCell''s rowIndex

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

1 Reply

AD Administrator Syncfusion Team April 19, 2005 09:56 AM

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.

Loader.
Live Chat Icon For mobile
Up arrow icon