This is a migrated thread and some comments may be shown as answers.

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

3 Answers 212 Views
DropDownTree
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 23 Aug 2019, 10:57 AM

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?

 

3 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 28 Aug 2019, 08:32 AM

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.
0
Alex
Top achievements
Rank 1
answered on 28 Aug 2019, 11:02 AM

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

0
Vessy
Telerik team
answered on 02 Sep 2019, 08:52 AM

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.
Tags
DropDownTree
Asked by
Alex
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Alex
Top achievements
Rank 1
Share this question
or