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.

How to retrieve the datarow from GridDataBoundGrid with multiple hierarchy levels.

Thread ID:





70122 Nov 28,2007 03:37 AM Nov 28,2007 04:49 AM Windows Forms 1
Tags: GridControl
Keping Wu
Asked On November 28, 2007 03:37 AM

Hi all,

I've created a master-detail view in GridDataBoundGrid with GridHierarchyLevel. Can anyone tell me how to retrieve the datarow from the current cell clicked?


Administrator [Syncfusion]
Replied On November 28, 2007 04:49 AM

One way you can do this is through the GridBoundRecordState object for the row.

GridCurrentCell cc = gridDataBoundGrid1.CurrentCell;

GridBoundRecordState rs = gridDataBoundGrid1.Binder.GetRecordStateAtRowIndex(cc.RowIndex);
if (rs.Position < rs.Table.Count)
DataRowView drv = rs.Table[rs.Position] as DataRowView;
if (drv != null)
this.Text = drv[0].ToString() + " " + drv[1].ToString();


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.