Letz assume two column names are col1 and col2. Code sample PageLoad() is:
foreach (DataRow row in myTable.Rows)
{
TreeNode node = new TreeNode(dr["col1"], dr["col2"]);
node.PopulateOnDemand = true;
TreeView1.Nodes.Add(node);
}
protected void PopulateNode(Object sender, TreeNodeEventArgs e)
{
string col1Id = e.Node.Value;
foreach (DataRow row in myTable.Rows)
{
TreeNode node = new TreeNode(dr["col1"], dr["col2"]);
node.PopulateOnDemand = true;
e.Node.ChildNodes.Add(node);
}
}