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

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

Thread ID:





14647 Jun 1,2004 06:28 PM UTC Jun 22,2004 09:48 PM UTC WinForms 2
Tags: GridControl
Ricardo J. Méndez
Asked On June 1, 2004 06:28 PM UTC

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 08:06 AM UTC

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 09:48 PM UTC



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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon