Don't display child in hierarchy if same as parent in Drop Down Tree

4 posts, 0 answers
  1. Alex
    Alex avatar
    11 posts
    Member since:
    Jun 2018

    Posted 23 Aug 2019 Link to this post

    I have a drop down tree in an asp.net web form with checkboxes.

    I don't want to display child in the hierarchy if they are the same as the parent 

    What is the best approach to this?

     

  2. Vessy
    Admin
    Vessy avatar
    2368 posts

    Posted 28 Aug 2019 Link to this post

    Hi Alex,

    Can you elaborate a bit on the exact scenario that you want to achieve? It will be really helpful if you prepare and send us a small sample demonstrating the behavior that you want to avoid, so we can suggest you further on how to do it (if possible). 

    Regards,
    Vessy
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Alex
    Alex avatar
    11 posts
    Member since:
    Jun 2018

    Posted 28 Aug 2019 Link to this post

    Hi Vessy

     

    There is a drop down tree which is attached to a sql data source.

    Please can you look at this link to see what I am trying to achieve :

    https://docs.microsoft.com/en-us/analysis-services/multidimensional-models/user-defined-hierarchies-ragged-hierarchies

    Alex

  4. Vessy
    Admin
    Vessy avatar
    2368 posts

    Posted 02 Sep 2019 Link to this post

    Hi Alex,

    RadDropDownTree does not have a built in logic to determine whether the child items values equals the ones of their parent, the control is visualizing the hierarchical data passed to it. Details on this matter can be read and tested here:

    As a possible option, you can compare manually the values of the child and parent items and hide the child item if they match. If you decide to go in this direction, you can do this check in the NodeDataBound event of the underlying TreeView of the control:

    https://docs.telerik.com/devtools/aspnet-ajax/controls/treeview/server-side-programming/events/nodedatabound

    If this is not the scenario you want to achieve through, pleases end us a sample data where we can examine the exact structure you want to bind to RadDropDownTree so we can examine it at our end.

    Regards,
    Vessy
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top