DropdownTree Checkbox selection issue

Hi,  I have an issue this control that whenever i activated the checkbox then selectable option not work. i want to make the the option selectable which have selectable true otherwise select its child on click the parent. Also Guide me how to get the onnodeselection event and how would i know that particular  node has child.

I attached screenshot. Inspection and QC should not selected in dropdown but child of that parent showed be selected


Attachment: Screenshot_20241004_134427_6710fcf2.7z

1 Reply

VM Vishwanathan Muruganantham Syncfusion Team October 7, 2024 03:15 PM UTC

Hi Asim,


Greetings from Syncfusion support.


Query 1: selectable option not work with checkbox


We would like to inform you that the selectable feature functions as expected when checkbox is disabled. Before proceeding as bug, please provide details on the specific features of the Dropdown Tree you are utilizing (such as AutoCheck, TreeSettings) and share a sample of your code. This information will assist us in delivering a prompt solution.


Query 2: how to get the onnodeselection event and how would i know that particular node has child.


To achieve the requirement, you need to bind the “Select” event of the Dropdown Tree. This event triggers when an item in the popup is selected by the user.

In this event’s arguments, you can retrieve the current selected node details from “itemData”.


Refer to the below code snippet for reference.


<div>

    <ejs-dropdowntree id="treedata" showCheckBox="true" select="OnNodeSelecting" >

        <e-dropdowntree-fields dataSource="treedata" value="id" parentValue="pid" hasChildren="hasChild" text="name" selected="selected" selectable="selectable"></e-dropdowntree-fields>

    </ejs-dropdowntree>

</div>

 

<script>

        function OnNodeSelecting(args) {

        console.log("Node selecting: ", args.itemData.hasChildren);

        }

</script>



Sample: Attached as zip folder


Best Regards,
Vishwanathan


Attachment: DropdownTreeSelectable_d55c0598.zip

Loader.
Up arrow icon