This is a migrated thread and some comments may be shown as answers.

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

2 Answers 193 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Seyfor
Top achievements
Rank 1
Seyfor asked on 12 Nov 2015, 07:51 PM

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 Answers, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 13 Nov 2015, 01:14 PM
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!
 
0
Seyfor
Top achievements
Rank 1
answered on 14 Nov 2015, 09:36 AM

I would guess that this would be automatic like grid.

It works, so thank you.

Tags
TreeList
Asked by
Seyfor
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Seyfor
Top achievements
Rank 1
Share this question
or