Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
5549
Custom created Webdatatree get selected node after postback
posted

Hi, i have create on a asp.net webpage a custom webdatatree with several rootnodes and several root childs (created
 aNodeRoot.Key
 aNodeRoot.Text
 NodeRoot.CheckState

and each node ist created as checkbox.

how can i get the selected node after a postback on server side (code behind) ?
After click on a button on the page i want get the selected node. i have tryed with
 For Each node As DataTreeNode In WebDataTree1.AllNodes

            If (node.Selected) Then

                Dim stest As String = "Huho"

            End If

        Next

but always no node are selected after postback

Parents
No Data
Reply
  • 2895
    Suggested Answer
    posted

    Hello Martin,

    Thank you for using our forum.

    I have investigated the case. I would like to suggest you using the CheckedNodes property. This property will return a list of all the nodes that are checked. Attached you can find a sample.

    If you have additional questions concerning the issue do not hesitate to contact me.

    WebDataTree_Checkbox.zip
Children