KendoTreeView CheckBox ClearAll

3 posts, 1 answers
  1. Rahul
    Rahul avatar
    2 posts
    Member since:
    May 2015

    Posted 06 May 2015 Link to this post

     am using KendoTreeView control for hierarchical data. Also I need to provide ClearAll feature where all other fields in form including selections made in KendoTreeView should be cleared. So I have written something like this :

    public ClearAll(): void {
            $('#myTreeView').find('input:checkbox').each(function (index,element) {
                $(element).prop('checked', false);
            });
        }

    Though this clears all selected checkboxes from treeview, however after this if I check parent node again - child checkboxes does not get checked.Also this behavior (child nodes not getting checked) happens for first time only, so if I uncheck and check parent node again - child nodes will be checked.I simulated sample example for this issue :

    http://dojo.telerik.com/@rahul_ec27/ALihu

     

    Thanks!! Rahul

  2. Answer
    Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 08 May 2015 Link to this post

    Hello Rahul,

    The approach with the dataItem / set('checked') seen in the dojo snippet is correct. The only problem in the snippet is that the TreeView instance is not retrieved properly -- see the updated snippet.

    Regards,
    Alex Gyoshev
    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. Rahul
    Rahul avatar
    2 posts
    Member since:
    May 2015

    Posted 08 May 2015 in reply to Alex Gyoshev Link to this post

    Thanks a lot Alex !!!
Back to Top