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
close icon

Hierarchical GridDataBoundGrid

I have created a hierarchical griddatabound grid which is bound to custom list ojects. The data displays perfectly and behaves exactly as it should. However a problem that I have encountered is that from the GridQueryCellInfo method I cannot work out how to access the data source of the rows on the second level of the hierarchy. I can get the parent object, but not the child or a reference to the property of the datasource which relates to the cell in question.

1 Reply

AD Administrator Syncfusion Team October 24, 2003 12:35 PM UTC

You need to get the GridBoundRecordState for a particular to determine the level of the row, whether the row has children, and those children are, the collection this row belongs to, etc. This object contains the information on the row. Here is a code snippet that will retrieve the recordstate of the current row. GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell; GridBoundRecordState rs = this.gridDataBoundGrid1.Binder.GetRecordStateAtRowIndex(cc.RowIndex); Console.WriteLine(rs.Table.Count);

Loader.
Live Chat Icon For mobile
Up arrow icon