Hello,
I have a Treeview called RadTreeView1 which is already populated as follows, this is working perfect:
I've set the root values checkable=true and all the children as checkable=false (so the user can only check or uncheck the root values). Each node has a value which is an integer number.
What I need to do is to click on a button, and retrieve all those nodes that are checked. Im using the code below but its not working:
What am I doing wrong?!
Thanks.
I have a Treeview called RadTreeView1 which is already populated as follows, this is working perfect:
Do While RS.Read If RS(0) = 1 Then Dim Node As New RadTreeNode Node.Text = (RS(2) & " " & RS(3) & " (" & RS(1) & ")") Node.Value = RS(1) Node.Checkable = True RadTreeView1.Nodes.Add(Node) Else Dim foundNode As RadTreeNode = RadTreeView1.FindNodeByValue(RS(5)) If foundNode IsNot Nothing Then Dim Node As New RadTreeNode Node.Text = (RS(2) & " " & RS(3) & " (" & RS(1) & ")") Node.Value = RS(1) Node.Checkable = False foundNode.Nodes.Add(Node) End If End IfI've set the root values checkable=true and all the children as checkable=false (so the user can only check or uncheck the root values). Each node has a value which is an integer number.
What I need to do is to click on a button, and retrieve all those nodes that are checked. Im using the code below but its not working:
Imports Telerik.Web.UIPartial Class Hierarchy_Compression Inherits System.Web.UI.Page Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click Dim Compression As IList(Of RadTreeNode) = RadTreeView1.CheckedNodes For Each node As RadTreeNode In Compression If node.Checked = True Then Response.Write(node.Value) End If Next End SubEnd ClassWhat am I doing wrong?!
Thanks.