I'm trying to create a tree that will allow the user to select nodes items by way of check boxes. I was hoping to
maybe use the datagrid, but i don't have to if there is another way. Any ideas on how this can be done?
TreeView is not part of the core ASP.NET Framework, so the namespace must be explicitly imported to refer to classes in the IE WebControls assembly.
IE Tag prefix is registered for the IE WebControls. Registering the prefix maps the prefix to the proper namespace for the controls.
If you want to detect when users select a particular node, you need to capture the SelectedIndexChanged event. Here's some more example code which demonstrates a subroutine associated with this event.
TreeViewSelectedIndexChanged.aspx
<%@....%> etc
<Script runat="server">
Sub TreeView_SelectedIndexChanged (s As Object, e As TreeViewSelectEventArgs)
lblSelectedNode.Text = treeBooks.GetNodeFromIndex(e.NewNode).Text
End Sub
</script>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.