I (Right click and) select a TreeViewNode in a grid with a single TreeViewColumn.
Then I call the following routine to get the cell Rectangle:
public static Rectangle GetCellRectangle(NineRays.Windows.Forms.FlyGrid flyGrid, NodeBase node, Column column)
{
FlyGridViewPort viewPort = flyGrid.ActiveRootPort;
int row = viewPort.Rows.GetRowFromNode(node);
if (row != -1) //node is visible
{
int col = viewPort.Columns.GetColumnCellIndex(column);
if (col != -1)//column is visible
{
return viewPort.GetRectangle(viewPort.Bounds, row, col);
}
}
return Rectangle.Empty;
}
No matter which node I Right select (column index is resolved, correctly, as 0), the Rectangle always comes back as:
X = 0, Y = 0, Width = 0, Height = 20
(The Bounds of the ActiveViewPort are returned as:
X = 1, Y = 1, Width = 384, Height = 311)