Checkbox ERROR for loading data from controller

3 posts, 0 answers
  1. Blair
    Blair avatar
    13 posts
    Member since:
    Mar 2013

    Posted 04 Jul 2014 Link to this post

    Hi,

    I wrote some codes like this getting the json data from the controller, which is working correctly:

            var data = new kendo.data.HierarchicalDataSource({
                transport: {
                    read: {
                        url: "LoadActivityPermissions",
                        dataType: "json"
                    }
                },
                schema: {
                    model: {
                        id: "id",
                        children: "items"
                    }
                }
            });
            $("#treeview").kendoTreeView({
                dataSource: data,
                dataTextField: "text",
                checkboxes: {
                    checkChildren: true
                }
           
    But for the checkboxes, the result is

    when some of the children nodes' checkboxes are checked, the parent checkbox is still left unchecked (which is blank), but it should be like a " - " in the checkbox, which means some of its children are checked.

    This happened only when I get the data from the "url" (controller).
     
    In the attached shortcut, the checkbox for "RootActivity" should be filled in a " - ", which means some of its children have been checked.

    Could anyone help me with this? It's very urgent for me.

    Thanks and regards,

    Charles























  2. Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 08 Jul 2014 Link to this post

    Hello Blair,

    I am not sure what could be causing this problem and I could not reproduce it on my side. Could you check this example which uses the provided configuration and let me know if the checkboxes are working as expected on your side or if I am missing something?

    Regards,
    Daniel
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Blair
    Blair avatar
    13 posts
    Member since:
    Mar 2013

    Posted 08 Jul 2014 in reply to Daniel Link to this post

    Hello Daniel,

    Yesterday I found the problem. That is because the javascript file I used, "kendo.all.min.js", is an old version. After I updated this file, it is working now.

    Thanks and regards,

    Charles
Back to Top