We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Only allow selection of items with no children

I'm looking at the Dropdown Tree control as it's almost exactly what I'm looking for to solve my problem.  There is one thing however that I cannot seem to do with any of the built-in settings.

Let's assume a data structure as such:

Item 1
    Item  1.1
    Item  1.2
      Item  1.2.1
      Item  1.2.2
Item 2
   Item 2.1

For my use case the user should only be able to select Item 1.1, Item 1.2.1, Item 1.2.2 and Item 2.1.  If you look closely you will see those items don't have any children.  That's the criteria.  Only items with no children should be selectable.  This is because I render items with "paths" into a Tree for easier navigation as many options are available.  Only those unique items are able for selection:

Item 1//Item 1.1
Item 1//Item 1.2//Item 1.2.1
Item 1//Item 1.2//Item 1.2.2
Item 2//Item 2.1

Is there any way to do this ?



1 Reply

IL Indhumathy Loganathan Syncfusion Team December 19, 2022 08:04 AM UTC

Hi Ceds,


Greetings from Syncfusion support.


Currently we don’t have support to prevent selection of parent node in Dropdown Tree. We have considered your request as a feature and this will be included in any of our upcoming releases. Generally, we will plan any feature implementation based on customer request count, feature rank and Wishlist plan for some feature.


You can track the feature status through the below link:


https://www.syncfusion.com/feedback/21709/provide-option-to-prevent-the-parent-node-selection-in-dropdown-tree


Regards,

Indhumathy L


Loader.
Up arrow icon