Hi,
I'am using this exemple :
http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/checkboxes/defaultcs.aspx
Each node is equal to a text, but to insert it in the database i need to pass an ID.
So is there a way to get ID from all the checkbox that are seleted?
By ID i mean the id that i passing from the database
Ex : If the user click the node
École Donat-Robichaud then this school as an unique id from the database = 1
École Secondaire-Assomption same thing id = 19
I hope i explan my self correctly
Here how i create my treeView :
With this i code i get all the name that are selected :
But i don't want the FullPath i need the ID that is selected
Tks
Luc
I'am using this exemple :
http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/checkboxes/defaultcs.aspx
Each node is equal to a text, but to insert it in the database i need to pass an ID.
So is there a way to get ID from all the checkbox that are seleted?
By ID i mean the id that i passing from the database
Ex : If the user click the node
École Donat-Robichaud then this school as an unique id from the database = 1
École Secondaire-Assomption same thing id = 19
I hope i explan my self correctly
Here how i create my treeView :
<
telerik:RadTreeView
runat
=
"server"
ID
=
"RadTreeView1"
DataSourceID
=
"SqlRegionEcole"
DataFieldID
=
"id"
DataFieldParentID
=
"parentId"
CheckBoxes
=
"true"
TriStateCheckBoxes
=
"true"
CheckChildNodes
=
"true"
DataValueField
=
"Luc"
Skin
=
"Sunset"
>
<
DataBindings
>
<
telerik:RadTreeNodeBinding
TextField
=
"Name"
/>
</
DataBindings
>
</
telerik:RadTreeView
>
With this i code i get all the name that are selected :
But i don't want the FullPath i need the ID that is selected
Protected Sub ShowCheckedNodes(ByVal treeView As RadTreeView)
Dim message As String = String.Empty
Dim nodeCollection As IList(Of RadTreeNode) = treeView.CheckedNodes
For Each node As RadTreeNode In nodeCollection
message += node.FullPath + "<
br
/>"
Next
Label4.Text = message
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
ShowCheckedNodes(RadTreeView1)
End Sub
Tks
Luc