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.
I have GridDataBoundGrid with two level. How can I reference back to the datarow when user click on second level row or any row.
In grid grouping control, there is GridTableCellStyleInfoEventArgs.TableIdentity.Table.DisplayElement[index] to reference back to GridRecordRow and then DataRowView. What about GridDataBoundGrid?
ADAdministrator Syncfusion Team August 4, 2006 05:56 AM UTC
Hi Ken,
The GridDataBoundGrid is bound to the datasource using the CurrencyManager, using the CurrenCyManager the current record''s corresponding row index can be retrieved. Try the code snippet below.
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell; CurrencyManager cm = (CurrencyManager) this.BindingContext[this.gridDataBoundGrid1.DataSource, this.gridDataBoundGrid1.DataMember]; DataRowView dv = (DataRowView) this.gridDataBoundGrid1.Binder.GetRecordStateAtRowIndex(cc.RowIndex).ListManager.Current; Console.WriteLine(dv[1].ToString());
Regards, Rajagopal
ADAdministrator Syncfusion Team August 4, 2006 06:04 AM UTC
Hi Ken,
Sorry for the inconvenience. Please follow the code snippet below.
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell; DataRowView dv = (DataRowView) this.gridDataBoundGrid1.Binder.GetRecordStateAtRowIndex(cc.RowIndex).ListManager.Current;