I have bound data from a datatable to Treeview which works great. I cannot seem to show a check box for each node and child nodes.
I have tried including a column in the dataTable with values set to true and tried to add binding with this column and value but to no avail.
I have also tried to loop through using for each node in treeView1.nodes
still no luck
i have included the code and dataTable
Code: Visual Basic.NET
If Not dsData Is Nothing Then
With TreeView1
.Nodes.Clear()
.AutoUncheckChildren = True
.AutoCheckParent = True
.DataSource = dsData.Tables(0)
.DataFields = "Level1|Level2|Level3|Level4|Level5|Level6|Level7|Level8|Level9"
End With
Dim Binding As New EO.Web.DataBinding()
Binding.DataField = "SecurityBitNumber"
Binding.Property = "Value"
TreeView1.Bindings.Add(Binding)
'Dim Check As New EO.Web.DataBinding()
'Check.DataField = "CheckBox"
'Check.Property = "ShowCheckBox"
'TreeView1.Bindings.Add(Check)
TreeView1.DataBind()
LoadTreeViewSecurityMask(gexException, ddlAccessGroups.SelectedValue)
For Each node As EO.Web.TreeNode In TreeView1.Nodes
node.ShowCheckBox = EO.Web.NullableBool.False
Next
Data:
1 1 IMS IMS Run NULL NULL NULL NULL NULL NULL NULL True NULL
1 2 IMS Administration Security NULL NULL NULL NULL NULL NULL NULL True NULL
1 3 IMS Administration Security Add NULL NULL NULL NULL NULL NULL True NULL
1 4 IMS Administration Security Edit NULL NULL NULL NULL NULL NULL True NULL
1 5 IMS Administration Security Delete NULL NULL NULL NULL NULL NULL True NULL
1 6 IMS Administration Setup NULL NULL NULL NULL NULL NULL NULL True NULL
1 7 IMS Administration Setup Add NULL NULL NULL NULL NULL NULL True NULL
1 8 IMS Administration Setup Edit NULL NULL NULL NULL NULL NULL True NULL
1 9 IMS Administration Setup Delete NULL NULL NULL NULL NULL NULL True NULL
1 10 IMS Issue NULL NULL NULL NULL NULL NULL NULL NULL True NULL
1 11 IMS Issue Add NULL NULL NULL NULL NULL NULL NULL True NULL
1 12 IMS Issue Edit NULL NULL NULL NULL NULL NULL NULL True NULL
1 13 IMS Issue Delete NULL NULL NULL NULL NULL NULL NULL True NULL
1 14 IMS Reports NULL NULL NULL NULL NULL NULL NULL NULL True NULL
1 15 IMS Reports Issue Detail NULL NULL NULL NULL NULL NULL NULL True NULL