More easiest way is following:
//Add Columns
flyGrid.Columns.AddRange(new Column[]
{
new TreeViewColumn("Nodes");
new Column("Data");
});
//create root node
Node rootNode= new TreeViewNode(new object[]{"Root", string.Empty});
//create sub nodes (children)
Node firstNode= new TreeViewNode(new object[]{"First", string.Empty});
Node secondNode= new TreeViewNode(new object[]{"Second", string.Empty});
//add children
rootNode.Items.AddRange(new NodeBase[]{firstNode, secondNode});
//Add to FlyGrid
flyGrid.Rows.Items.Add(rootNode);
Also you can see the TreeView Replacement, NestedGrids, Self Related Hierarchical Grid (Virtual Grid) and Self Related Hierarchical Grid (DataBound Grid) samples source.[/code]