setOptions({selectable: ...); not working

3 posts, 0 answers
  1. Matjaž
    Matjaž avatar
    80 posts
    Member since:
    Jul 2015

    Posted 12 Nov 2015 Link to this post

    I am trying to change selection mode on button click. This code works for grid, but not for TreeList.

     

    if (that.treelist.options.selectable !== "multiple, row")
    {
        that.treelist.setOptions({ selectable: "multiple, row" });
        that.dataSource.read();
    }

     that.treelist.options.selectable is changed, but behaviour in treelist is not.

    that.treelist.setOptions({ selectable: "multiple, row" });
    that.treelist.setOptions({ selectable: "multiple, row" });
  2. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 13 Nov 2015 Link to this post

    Hi Matjaž,

    Try to call _selectable() method, to reinitialize the selection.

    $("#treelist").data("kendoTreeList").options.selectable = true;
    $("#treelist").data("kendoTreeList")._selectable();

    Regards,
    Vasil
    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. Matjaž
    Matjaž avatar
    80 posts
    Member since:
    Jul 2015

    Posted 14 Nov 2015 in reply to Vasil Link to this post

    I would guess that this would be automatic like grid.

    It works, so thank you.

Back to Top