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.
Unfortunately, activation email could not send to your email. Please try again.

Hierarchical GridDataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

8178 Oct 24,2003 07:40 AM Oct 24,2003 08:35 AM Windows Forms 1
loading
Tags: GridControl
Marcus Taylor
Asked On October 24, 2003 07:40 AM

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.

Administrator [Syncfusion]
Replied On October 24, 2003 08:35 AM

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

CONFIRMATION

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.

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.

;