TreeView checkboxes; checkChildren

2 posts, 0 answers
  1. Mathias
    Mathias avatar
    15 posts
    Member since:
    Oct 2014

    Posted 20 Jan 2015 Link to this post

    Hey i've a Problem with KendoTreeview. I build a TreeView with a json Datasource
    JS Code:
    $(document).ready(function() {
    var dataSource = new{
    transport: {
    read: {
    url: servlet,
    datatype: "json",
    contentType: "application/json"

    schema: {
    model: {
    children: "items",
    id: "id"
    data: function(data) {
    var dataArray = eval(data);
    return dataArray;

    var treeView = $("#treeView").kendoTreeView({

    dataSource: dataSource,
    dataTextField: "text",
    checkboxes: {
    checkChildren: true
    It works well but if i use checkChildren: true the pre check is not working. if i use only checkboxes: true without checkchildren pre check works but not check all childs. What is wrong ?

  2. Alex Gyoshev
    Alex Gyoshev avatar
    2513 posts

    Posted 22 Jan 2015 Link to this post

    Hello Mathias,

    The nodes, serialized in such way, conflict with the checkChildren functionality -- if the root node is checked, all its child nodes need to be checked, too. You can either serialize all nodes as checked, or not serialize the checked state for the child nodes (as seen in this Dojo snippet).

    Alex Gyoshev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top