Underlying object for the node/row represented as array of objects that will displayed as array of cells:
for example, to show this structure:
Name Age Married
- Bob ............80 ..X
- - Dan .........50
- - Sally ........45 ..X
- - - Berty .....20
- - - Elmer ....21 ..X
- - - Duncan .18
- - Missy .......38
- - - Peter ......8
- Bob Jr. .......51 ..X
you should use following code:
//first level
TreeViewNode bob = new TreeViewNode(new object[]{"Bob", 80, true});
TreeViewNode bobJr = new TreeViewNode(new object[]{"Bob Jr.", 51, true});
//second level
TreeViewNode dan = new TreeViewNode(new object[]{"Dan", 50, false});
TreeViewNode sally = new TreeViewNode(new object[]{"Sally", 45, true});
TreeViewNode missy = new TreeViewNode(new object[]{"Missy", 38, false});
//third level
TreeViewNode berty = new TreeViewNode(new object[]{"Berty", 20, false});
TreeViewNode elmer = new TreeViewNode(new object[]{"Elmer", 21, true});
TreeViewNode duncan = new TreeViewNode(new object[]{"Duncan", 18, false});
//add to Sally
sally.Items.AddRange(new NodeBase[]{berty, elmer, duncan});
TreeViewNode peter = new TreeViewNode(new object[]{"Peter", 8, false});
//add to Missy
missy.Items.Add(peter);
//add to Bob
node1.Items.AddRange(new NodeBase[]{dan, sally, missy});
//add first level node to FlyGrid
flyGrid.Rows.Items.AddRange(bob, bobJr);