Approved
Last Updated: 19 Jun 2019 14:43 by ADMIN

Context:

  1. Load on demand enabled
  2. Check Children is set true
  3. Remote api call to load data.
  4. Attached sample code is using kendo services.

 

Issue or Scenario:

When you select the top node or checkbox, it shows 1 item(s) selected. However, when you expand and deselect child nodes or checboxes, the single tag message will removed and blank field is present.

please find below code and attached gif file, these files will give you clear understanding on the issue with dropdowntree.

<!--BELOW IS THE CODE SAMPLE ON THIS BUG -->

<!DOCTYPE html>
<html>
<head>
    <base href="https://demos.telerik.com/kendo-ui/dropdowntree/remote-data-binding">
    <style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style>
    <title></title>
    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2019.2.514/styles/kendo.common-material.min.css" />
    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2019.2.514/styles/kendo.material.min.css" />
    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2019.2.514/styles/kendo.material.mobile.min.css" />

    <script src="https://kendo.cdn.telerik.com/2019.2.514/js/jquery.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2019.2.514/js/kendo.all.min.js"></script>


</head>
<body>
        <div id="example">
            <div class="demo-section k-content">
                <input id="dropdowntree" style="width: 100%;" />
            </div>
            <script>
                var serviceRoot = "https://demos.telerik.com/kendo-ui/service";
                    homogeneous = new kendo.data.HierarchicalDataSource({
                        transport: {
                            read: {
                                url: serviceRoot + "/Employees",
                                dataType: "jsonp"
                            }
                        },
                        schema: {
                            model: {
                                id: "EmployeeId",
                                hasChildren: "HasEmployees"
                            }
                        }
                    });

                $("#dropdowntree").kendoDropDownTree({
                    placeholder: "Select ...",
                    dataSource: homogeneous,
                    height: "auto",
                   checkboxes: { checkChildren: true },
                    dataTextField: "FullName",
                   clearButton: true,
            checkAll: false,
            autoClose: false,
            tagMode: "single",
                   loadOnDemand: true
                });
            </script>
        </div>


</body>
</html>

    
Approved
Last Updated: 05 Apr 2019 10:29 by ADMIN
Created by: Nasser
Comments: 0
Category: DropDownTree
Type: Feature Request
3
Implement server filtering for the DropDownTree.
Pending Review
Last Updated: 04 Feb 2019 15:43 by ADMIN
Created by: Juan
Comments: 1
Category: DropDownTree
Type: Bug Report
0

Hi,

I have a DropDownTree with checkboxes, like so:

                    $("#cbxWorkZones").kendoDropDownTree({
                        placeholder: "Select Work Zones...",
                        dataTextField: "name",
                        dataValueField: "id",
                        valuePrimitive: true,
                        checkboxes: true,
                        checkAll: true,
                        autoClose: false,
                        autoBind: false,
                        dataSource: data.workZones
                    });

 

I get an instance of it like so:

    var wz = $('#cbxWorkZones').data("kendoDropDownTree");

I evaluate value and get this: []  meaning, there are no values selected.

Then I set its value like so:

    wz.value(["8", "6"]);

After setting the values, I evaluate value again, and I get this: [8,6,8,6]

Why are the values duplicated?

Thanks!

Juan

 

Pending Review
Last Updated: 24 Dec 2018 07:24 by ADMIN
Created by: Samuel
Comments: 1
Category: DropDownTree
Type: Feature Request
2

I use the below template to render nodes (so that root nodes do not have a checkbox), but when I click checkAll button the root node(s) content are also displayed as selected

 

You should provide an event to custom handle this behavior and ignore nodes unselectable

 .Checkboxes(setting => setting
                                                .CheckChildren(true)
                                                .Template("# if (item.level() > 0) { #" +
                                                            "<input type='checkbox' #= item.checked ? 'checked' : '' #>" +
                                                            "# item.text = item.SymptomName #" +
                                                            "#}else{#" +
                                                                "# item.text = item.LocationName #" +
                                                            "#}#"
                                                )
                                )

 

Keep up the awesome work !