R
rockdale
HI,
I need to re populate my treeview control based on user's selection.
Seems like there is no treeview.clear/ reset method. So I remove the
rootnode from my treeview as following
TreeNode n = tvSchedule.FindNode("-1");
if(n!=null){
myTreeView.Nodes.Remove(n);
}
then I populate my treeview
and finally I add in my root node, set the expandDepth
root.Selected = true;
myTreeView.Nodes.Add(root);
myTreeView.ExpandDepth = 2;
The expandDepth works fine the first time the page loaded. But when
user click the linkbutton which re populate the treeview, the
expandDepth always on the root level.
Has anyone met this problem before?
thanks
-rockdale
I need to re populate my treeview control based on user's selection.
Seems like there is no treeview.clear/ reset method. So I remove the
rootnode from my treeview as following
TreeNode n = tvSchedule.FindNode("-1");
if(n!=null){
myTreeView.Nodes.Remove(n);
}
then I populate my treeview
and finally I add in my root node, set the expandDepth
root.Selected = true;
myTreeView.Nodes.Add(root);
myTreeView.ExpandDepth = 2;
The expandDepth works fine the first time the page loaded. But when
user click the linkbutton which re populate the treeview, the
expandDepth always on the root level.
Has anyone met this problem before?
thanks
-rockdale