Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Select certain Node in coding.

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

Select certain Node in coding.
Link Posted: 26-Mar-2011 00:16
Why not the bottom node is shown up in the visible zone when i select it in coding by flyGrid.Selected = node ? Or how can i do it ?
Link Posted: 30-Mar-2011 18:19
You can use the FlyGrid.ActivePort.EnsureVisible method to make node visible.
This example shows how to show (scroll to) last or first row in the FlyGrid by using EnsureVisible method.
private void ShowNode(FlyGrid flyGrid, Nodebase node)
{
  flyGrid.ActivePort.EnsureVisible(node);
}

private void ShowRow(FlyGrid flyGrid, int row)
{
  NodeBase rowNode = flyGrid.Rows.GetNodeFromRow(row);
  ShowNode(flyGrid, rowNode);
}

private void ShowLastNode(FlyGrid flyGrid)
{
  ShowRow(flyGrid, flyGrid.ActivePort.RowCount-1);
}

private void ShowFirstNode(FlyGrid flyGrid)
{
  ShowRow(flyGrid, 0);
}
Link Posted: 05-Apr-2011 19:01
Thank you!
Link Posted: 05-Apr-2011 19:02
Thank you, my code works!