Ticket Q388857
Visible to All Users

ASPxTreeList - How to get values of parent and child nodes

created 13 years ago

Hello:
I would like to get the parent and child values in ASPXTreeList and concatenate their values in order to get the URL of the form I want to access for example:
Users > Add New User
This one I could make it in the attached example, but in the case the node has children, I don ́t know how to get those values and concatenate them to form the complete URL like this:
Users > Assign > PC
                      > Notebook
                      > Mouse
I hope you can help me, Thanks

Comments (2)
DevExpress Support Team 13 years ago

    Hello,
    I believe that you can use TreeListNodeIterator to iterate through child nodes and collect their values. Call the ASPxTreeList.CreateNodeIterator method to get the Iterator reference.
    Best regards,
    Vladimir

    IE IE
    Industrias Energeticas 13 years ago

      I modified my example and now I get the values of Parent, Child and GrandSon,I do it by clicking on buttons but now I want to save the values in session variables every time I select a node, without using those buttons, How can I do this? I need you to modify my ATTACHED PROJECT because I already checked your examples and I couldn't find an example like this, thanks.

      Answers approved by DevExpress Support

      created 13 years ago (modified 12 years ago)

      Hello,
      Thank you for your update. I believe you can use the code from the E2157 - OBSOLETE: How to change the style of a parent node's selection checkbox if some of its child nodes are selected Code Central example to accomplish this task:
      - Set the ASPxTreeList.SettingsBehavior.ProcessSelectionChangedOnServer property to "True";
      - Handle the server-side ASPxTreeList.SelectionChanged;
      - Iterate through nodes' collection;
      - Save the required information in the Session state.
      Thanks,
      Mike
      P.S. It seems you are using an older build of our components (according to the report's Build field). Please visit our Version Info Page to learn about the most recent versions of our products and obtain instructions on how to update them. In addition, check the What’s New list to learn more about newly introduced features and issues we have already resolved in the most recent version.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.