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 the following question concerning the GridDataBoundGrid control (v.4.4.0.51):
How can I refer to a grid row that contains a specific record, based on the level of the table that contains this record and the position of this record in the table? For example, in the "ExportGrid" sample, if I expand the 2nd row ("CategoryName = Condiments") in the topmost table and then the 5th row ("ProductName = Northwoods Cranberry Sauce") in the nested table, how can I programmaticaly determine the grid-relative row index of the 6th record ("OrderID = 10709") in the OrderDetails table?
So far, I can only guess that this can be done by iterating through the grid rows and checking the displayed text, or something like that. I am just wondering if there is a simpler way to do that. Any help will be greatly appreciated.
I've found a simple solution, but it assumes that all records in the table above the desired record are collapsed:
int GetChildRowIndex (GridDataBoundGrid grid, int ParentRowIndex, int Level, int RecordIndex) { return ParentRowIndex + grid.Binder.GetHierarchyLevel(Level).RowCountPerRecord*(RecordIndex + 1); }