Binding TreeView Control to an Arraylist
-
Hi, I am developing application in which an Arraylist has a list of users. I also have a TreeView to show the users in the list. Can anyone tell me how to bind the TreeView Control to the Arraylist?
Thanks in advance, Murali
Murali, If you want to use a tree view then one way i can suggest is that, you you populte the tree view like below: Suppose "tvw" is the tree view. TreeNode ndRoot = new TreeNode(stringUserName); tvw.Nodes.Add(ndRoot); this way you can add all ur users in the tree view. Manoj
Manoj Never Gives up
-
Murali, If you want to use a tree view then one way i can suggest is that, you you populte the tree view like below: Suppose "tvw" is the tree view. TreeNode ndRoot = new TreeNode(stringUserName); tvw.Nodes.Add(ndRoot); this way you can add all ur users in the tree view. Manoj
Manoj Never Gives up
Hi Manoj, Thanks for your reply. I am able to add nodes into the tree view without any problem. However, I want to bind an Arraylist to the TreeView so that the TreeView is controlled whenever the Arraylist is modified (Addition/Deletion of Users). Is that possible?
Thanks in advance, Murali
-
Hi Manoj, Thanks for your reply. I am able to add nodes into the tree view without any problem. However, I want to bind an Arraylist to the TreeView so that the TreeView is controlled whenever the Arraylist is modified (Addition/Deletion of Users). Is that possible?
Thanks in advance, Murali