hi, the problem im experiencing is regarding a checkbox enabled radtreeview with options
TriStateCheckBoxes="true"
CheckChildNodes="false"
The rootnode (if no child nodes are selected) does successfully identify (and save) the checkstatus to the database by using:
the RadTreeView1.CheckedNodes method
and when I load the tree, I do in fact load the parent node that is checked, with the checked status
the problem is that when the tree is reloaded ,whilst it does identify that the parent node has a checked status, it does not physically put a check mark next to it on the client side ,although the node.checked instruction definitely gets executed for the specific rootnode
e.g. of problem
Fruit
- Strawberrys
- Apples
Vegetables
- Cauliflower
- Pumpkin
Other
If i only select fruit, and not strawberries or apples, (thus only selecting the Fruit checkbox), then when the tree gets saved, and reloaded, the Fruit checkbox is not ticked, even though if you loop through the RadTreeView.CheckedNodes, the Fruit node actually says it does have the checked status, even though the Fruit node does not show the checked status on the front end
the outcome of the problem is thus that the user checks a rootnode, the tree gets reloaded in the backend, and then even though the tree knows (and the properties say) that the rootnode is checked, it does not show the user that the rootnode is checked
also in the ReloadTree event i created (listed below), even if i just instruct the (root)node to be checked, in the very next line the checkstate of the node is unchecked.
Also interesting, if i check a Rootnode which does not have childnodes ("Other" in the example), there is no problem, it saves and when the tree is populated, it loads the checkbox again, so this only happens if there are child nodes
any help? I have to redo a whole system if i cant get this to work
was this perhaps fixed in newer versions of radtreeview?
TriStateCheckBoxes="true"
CheckChildNodes="false"
The rootnode (if no child nodes are selected) does successfully identify (and save) the checkstatus to the database by using:
the RadTreeView1.CheckedNodes method
and when I load the tree, I do in fact load the parent node that is checked, with the checked status
the problem is that when the tree is reloaded ,whilst it does identify that the parent node has a checked status, it does not physically put a check mark next to it on the client side ,although the node.checked instruction definitely gets executed for the specific rootnode
e.g. of problem
Fruit
- Strawberrys
- Apples
Vegetables
- Cauliflower
- Pumpkin
Other
If i only select fruit, and not strawberries or apples, (thus only selecting the Fruit checkbox), then when the tree gets saved, and reloaded, the Fruit checkbox is not ticked, even though if you loop through the RadTreeView.CheckedNodes, the Fruit node actually says it does have the checked status, even though the Fruit node does not show the checked status on the front end
the outcome of the problem is thus that the user checks a rootnode, the tree gets reloaded in the backend, and then even though the tree knows (and the properties say) that the rootnode is checked, it does not show the user that the rootnode is checked
also in the ReloadTree event i created (listed below), even if i just instruct the (root)node to be checked, in the very next line the checkstate of the node is unchecked.
Also interesting, if i check a Rootnode which does not have childnodes ("Other" in the example), there is no problem, it saves and when the tree is populated, it loads the checkbox again, so this only happens if there are child nodes
any help? I have to redo a whole system if i cant get this to work
was this perhaps fixed in newer versions of radtreeview?
Protected Sub ReloadCreatedRADTree(ByVal tv As RadTreeView, ByVal dt As DataTable)
Dim message As String = ""
Dim nodeColletion As IList = tv.GetAllNodes
For Each node As RadTreeNode In nodeColletion
Dim iLoopDT As Integer
For iLoopDT = 0 To dt.Rows.Count - 1
Dim iBranchID As Integer = dt.Rows(iLoopDT)("BranchID")
If node.Value = iBranchID Then
node.Checked = True
If node.Level = 0 Then
If node.CheckState = TreeNodeCheckState.Unchecked Then
'even though i just instructed the node to be checked,it still has unchecked status here
End If
End If
End If
Next iLoopDT
Next node
End Sub