I coded to call a ListView and I want to have it where I can either set the selectable attribute off or on depending on how I am using the view at the time. I find that once I call the KendoListView with selectable: true, it never turns off, even if I reload with the isSelectable set to false). Is there something I need to do to clear the previous setting?
Here is a sample of the code:
$("#content").empty();
$("#content").append(template);
if (isSelectable) {
$("#content").kendoListView({
dataSource: dataSource,
template: kendo.template($("#template").html()),
selectable: true,
change: function (e) {
alert("selected change event");
}
});
}
else {
$("#content").kendoListView({
dataSource: dataSource,
template: kendo.template($("#template").html()),
selectable: false
});
}
Here is a sample of the code:
$("#content").empty();
$("#content").append(template);
if (isSelectable) {
$("#content").kendoListView({
dataSource: dataSource,
template: kendo.template($("#template").html()),
selectable: true,
change: function (e) {
alert("selected change event");
}
});
}
else {
$("#content").kendoListView({
dataSource: dataSource,
template: kendo.template($("#template").html()),
selectable: false
});
}