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.

Finding out what level the grid is in - based on ExpandGrid example

Thread ID:





14647 Jun 1,2004 02:28 PM Jun 22,2004 05:48 PM Windows Forms 2
Tags: GridControl
Ricardo J. Méndez
Asked On June 1, 2004 02:28 PM

I''m working on a grid based off the ExpandGrid example. I have two levels, a master and a detail, related by hlBatch_Item = gridBinder.AddRelation("BatchItem"); I''ve added a context menu to the grid, which should behave differently if the user is clicking on an Item row or on a Batch row. - How can I find out in which one I am? - From a group of expanded Item rows, how can I obtain their corresponding Batch row? Thanks in advance, Ricardo

Administrator [Syncfusion]
Replied On June 2, 2004 04:06 AM

Given a particular grid rowIndex, you can use GridBoundRecordState rs = this.grid.Binder.GetRecordStateFromRowIndex(rowIndex); This GridBoundRecordState holds the information you requested, rs.LevelIndex and rs.Position. To get the rowIndex under the current mouse location, you can use code like; int row, col; Point pt = this.grid.PointToClient(Control.MousePosition); this.grid.PointToRowCol(pt, out row, out col, -1);

Ricardo J. Méndez
Replied On June 22, 2004 05:48 PM



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.