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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridDataBoundGrid: Addressing rows by table level and record position within table

Thread ID:





59064 Apr 4,2007 11:27 AM UTC Apr 4,2007 01:00 PM UTC WinForms 1
Tags: GridControl
Helen Kosova
Asked On April 4, 2007 11:27 AM UTC


I have the following question concerning the GridDataBoundGrid control (v.

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.


Replied On April 4, 2007 01:00 PM UTC

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);


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon