Dear all
For some strange reason the RadTreeView will not allow me to deselect the bottom node (as seen in picture). I have tried to programmatically select the node and even setting a SelectedCssClass with transparent as background color and still the same result. If any other node is clicked the selection reverts back to the same one.
I load the nodes programmatically using the following code ...
and the aspx call for the control
After this code executes then I have tried the TreeView1.SelectedNodes.Clear() . Nothing works!
Any help with this matter would be most appreciated!
Neftali Figueroa
System Analyst
For some strange reason the RadTreeView will not allow me to deselect the bottom node (as seen in picture). I have tried to programmatically select the node and even setting a SelectedCssClass with transparent as background color and still the same result. If any other node is clicked the selection reverts back to the same one.
I load the nodes programmatically using the following code ...
Private Sub PopulateNodes(ByVal nodes As Telerik.Web.UI.RadTreeNodeCollection, Optional parentid As Integer = Nothing)
Dim objConn As New SqlConnection(Application("dbRO"))
Dim tConn As New SqlConnection(Application("db"))
Dim objCommand As New SqlCommand("SELECT ItemID,ItemDescription,ItemURL,ImageURL FROM tblROMenuItems sc WHERE Visible=1 ORDER BY ItemOrder", "ItemParent=@ParentID AND Visible=1 ORDER BY ItemOrder,ItemOrder2,ItemOrder3,ItemOrder4"), objConn)
If Not (parentid = 0) Then objCommand.Parameters.Add("@ParentID", SqlDbType.Int).Value = parentid
Dim da As New SqlDataAdapter(objCommand)
Dim dt As New DataTable()
da.Fill(dt)
For Each dr As DataRow In dt.Rows
Dim tn As New RadTreeNode
Select Case dr("ItemID").ToString
Case "52" 'separation lines
tn.Enabled = False 'tn.SelectAction = TreeNodeSelectAction.None
End Select
tn.Value = dr("ItemID").ToString
tn.ImageUrl = dr("ImageURL").ToString
tn.Text = dr("ItemDescription").ToString
tn.CssClass = IIf(parentid = 0, "rootNode", "childNode")
tn.Target = dr("ItemURL").ToString
nodes.Add(tn)
PopulateNodes(tn.Nodes, dr("ItemID"))
Next
End Sub
and the aspx call for the control
<
asp:Panel
BorderStyle
=
"None"
CssClass
=
"Menu"
HorizontalAlign
=
"Left"
ID
=
"pnlModules"
runat
=
"server"
ScrollBars
=
"Auto"
style
=
"background-size: 100%; left: 0; position: relative; top: 0; width: 100%"
>
<
telerik:RadTreeView
BorderStyle
=
"None"
ExpandAnimation-Duration
=
"200"
ID
=
"TreeView1"
RenderMode
=
"Lightweight"
runat
=
"server"
SelectedCssClass
=
"selectedNode"
ShowLineImages
=
"False"
SingleExpandPath
=
"True"
Width
=
"100%"
MaxDataBindDepth
=
"10"
/>
</
asp:Panel
>
After this code executes then I have tried the TreeView1.SelectedNodes.Clear() . Nothing works!
Any help with this matter would be most appreciated!
Neftali Figueroa
System Analyst