how to uncheck all checkbox kendo treeview

5 posts, 0 answers
  1. Guillaume
    Guillaume avatar
    9 posts
    Member since:
    Jan 2015

    Posted 31 Aug 2015 Link to this post

    all in the question:

    how to uncheck all checkbox kendo treeview at once

    thank

  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 02 Sep 2015 Link to this post

    Hi,

    While there is no API method for doing this, you can achieve the same using jQuery. For example: 
    $("#treeview .k-checkbox input").prop("checked", false).trigger("change");

    Regards,
    Alexander Popov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. marco
    marco avatar
    33 posts
    Member since:
    Sep 2007

    Posted 05 Nov Link to this post

    it doesn't work at all
  5. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 09 Nov Link to this post

    Hi marco,

    It appears that the jQuery selector shown below is not correct, therefore no checkboxes are being affected by the prop method. The following works as expected on our demo page: 
    $("#treeview input.k-checkbox").prop("checked", false).trigger("change");


    Regards,
    Alexander Popov
    Telerik by Progress
     
    Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
     
  6. John
    John avatar
    18 posts
    Member since:
    Apr 2015

    Posted 30 Nov in reply to Alexander Popov Link to this post

    I did have what the first selector Alexander posted which worked for me until I installed version 2016.3.1118.  Here is what I ended up with that is working.

    $("#treeview .k-checkbox-wrapper input").prop("checked", false).trigger("change");

Back to Top
Kendo UI is VS 2017 Ready