That is fine, but I also need to know what the value of the node is. In the example the tree is loaded as follows:
DataSet dSet = new DataSet("DataBase");
DataTable dTable = new DataTable("Orders");
dSet.Tables.Add(dTable);
dTable.Columns.Add("ID");
dTable.Columns.Add("OwnerID");
dTable.Columns.Add("Title");
dTable.Columns.Add("Selected");
// Add nodes (OwnerID is null for root nodes)
dTable.Rows.Add(new object[] { 1, null, "Developer Tools"});
dTable.Rows.Add(new object[] { 2, 1, "Spices.Net", true });
dTable.Rows.Add(new object[] { 3, 1, "Spices.Obfuscator" });
dTable.Rows.Add(new object[] { 4, 1, "Spices.Decompiler" });
dTable.Rows.Add(new object[] { 5, null, ".Net Controls" });
dTable.Rows.Add(new object[] { 6, 5, "FlyGrid.Net" });
dTable.Rows.Add(new object[] { 7, 5, "FlyTreeView for ASP.NET 1.1", false });
dTable.Rows.Add(new object[] { 8, 5, "FlyTreeView for ASP.NET 2.0", true });
// Call FlyTreeView.ConvertTabularDataToHierarchical method to convert into hierarchical datasource
IHierarchicalEnumerable hierarchicalData =
NineRays.WebControls.FlyTreeView.ConvertTabularDataToHierarchical(dSet, "Orders", "ID", "OwnerID");
// Bind the treeview
flyTreeView.DataSource = hierarchicalData;
flyTreeView.DataBind();
Is there a way to access the dTable column of "ID" after the databinding has occured? Does that value exist in the treenode? I am assigning the "ID" column as my Primary Key value.