I've partially created a page with your code and sample datasets. I do not experience any problems with it.
Could you please add any code that will break flytreeview?
This is code-behind. ASPX is quite the same as you posted.
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NineRays.WebControls;
public partial class Tooltip_Test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
FlyTreeNode nodeGroup;
FlyTreeNode oRootNode = new FlyTreeNode(\"Root\", \"Root\");
tv.Nodes.Add(oRootNode);
DataTable rootNodes = new DataTable();
rootNodes.Columns.Add(\"ID\", typeof(string));
rootNodes.Columns.Add(\"Name\", typeof(string));
rootNodes.Columns.Add(\"NavigateUrl\", typeof(string));
rootNodes.Rows.Add(\"1\", \"name1\", \"name1/name1.htm\");
rootNodes.Rows.Add(\"2\", \"name2\", \"name2/name2.htm\");
rootNodes.Rows.Add(\"3\", \"name3\", \"name3/name3.htm\");
foreach (DataRow rootNode in rootNodes.Rows)
{
nodeGroup = new FlyTreeNode();
nodeGroup.Text = (string)rootNode[\"Name\"];
nodeGroup.Value = (string)rootNode[\"ID\"];
nodeGroup.NavigateUrl = (string)rootNode[\"NavigateUrl\"];
nodeGroup.ToolTip = nodeGroup.NavigateUrl;
oRootNode.ChildNodes.Add(nodeGroup);
//finally, get the children for each root
GetNodeChildren(nodeGroup);
}
}
}
public void GetNodeChildren(FlyTreeNode oNodeIn)
{
DataTable oNodes = new DataTable();
oNodes.Columns.Add(\"ID\", typeof(string));
oNodes.Columns.Add(\"Name\", typeof(string));
oNodes.Columns.Add(\"Value\", typeof(string));
oNodes.Rows.Add(\"1\", \"name1\", \"value1\");
oNodes.Rows.Add(\"2\", \"name2\", \"value2\");
oNodes.Rows.Add(\"3\", \"name3\", \"value3\");
FlyTreeNode nodeGroup;
//Populate the TreeView from the DataSet.
foreach (DataRow oNode in oNodes.Rows)
{
nodeGroup = new FlyTreeNode((string)oNode[\"Name\"], (string)oNode[\"Value\"]);
oNodeIn.ChildNodes.Add(nodeGroup);
// if (Convert.ToBoolean(oNode.hasChild)) GetNodeChildren(nodeGroup);
}
}
}