protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
{
string input = TreeView1.SelectedValue.ToString();
DataSet ds = new DataSet();
TreeLogic bl = new TreeLogic();
TreeNode root= new TreeNode(input);
ds = bl.getChild(input);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
TreeNode tnode = new TreeNode(ds.Tables[0].Rows[i][1].ToString());
tnode.SelectAction = TreeNodeSelectAction.Expand;
root.ChildNodes.Add(tnode);
}
}
当我选择父节点时,子节点不显示。谁能告诉我为什么?