I have a dynamic created listview. The schema of the datasource is also changing tempanding on the action in the application. So the schema also is dynamically created.
My problem is, I can not update the template.
My code is
if (queryResultsFirstLoad) {
queryResultsFirstLoad = false;
e.view.element.find("#queryResultsViewUl").kendoMobileListView({
template : '<a>' + listInnerHtml + '</a>',
dataSource : kendo.data.DataSource.create(data),
click : function(e) {
if (e.dataItem) {
queryResultItemClick(e);
}
}
});
} else {
$("#queryResultsViewUl").data("kendoMobileListView").setDataSource(data);
var newTemplate = kendo.template(listInnerHtml);
$("#queryResultsViewUl").html(newTemplate(data));
}
It works fine when it is first time loaded. But when it is load the second time, I can not update the template of the listview.
I couldn't find a method which only changes the template.. Another option was destroying the kendoListView.. it works