The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator Syncfusion Team 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);