Hi, I'm trying to put some results in a ListView with Endless Scroll.
I have
<div class="view-content">
<ul id="searchResults"></ul>
</div>
<script type="text/x-kendo-tmpl" id="template">
<a data-role="button" data-bind="click: onDetails(#= var1 #)">
<div class="person">
<h3>#:var2#</h3>
<p>#:var3#</p>
<p>#:var4#</p>
</div>
</a>
</script>
in my index.html file.
Then, I have
var dataSource = new kendo.data.DataSource({
data: response
});
$("#searchResults").kendoMobileListView({
dataSource: dataSource,
template: $("#template").text(),
endlessScroll: true,
virtualViewSize: 50
});
in a separate script file.
The variable response is the response from the success callback of an ajax call. The initialization of the Mobile ListView is inside of the success callback. I have my reasons for doing this instead of using the transport: read option in the Kendo UI's DataSource.
In the Q2 version of Kendo UI, it would bunch all the results at the top; that is, all the results would be shoved into the space for one result.
In the Q3 version of Kendo UI, I get an uncaught TypeError: "Cannot call method 'makeVirtual' of null at kendo/js/kendo.mobile.min.js (line: 15)."
I have tried setting the pageSize of the dataSource, but the Q3 release brought the promise of virtualizing local data. Unfortunately, it isn't working.
Thanks in advance!
I have
<div class="view-content">
<ul id="searchResults"></ul>
</div>
<script type="text/x-kendo-tmpl" id="template">
<a data-role="button" data-bind="click: onDetails(#= var1 #)">
<div class="person">
<h3>#:var2#</h3>
<p>#:var3#</p>
<p>#:var4#</p>
</div>
</a>
</script>
in my index.html file.
Then, I have
var dataSource = new kendo.data.DataSource({
data: response
});
$("#searchResults").kendoMobileListView({
dataSource: dataSource,
template: $("#template").text(),
endlessScroll: true,
virtualViewSize: 50
});
in a separate script file.
The variable response is the response from the success callback of an ajax call. The initialization of the Mobile ListView is inside of the success callback. I have my reasons for doing this instead of using the transport: read option in the Kendo UI's DataSource.
In the Q2 version of Kendo UI, it would bunch all the results at the top; that is, all the results would be shoved into the space for one result.
In the Q3 version of Kendo UI, I get an uncaught TypeError: "Cannot call method 'makeVirtual' of null at kendo/js/kendo.mobile.min.js (line: 15)."
I have tried setting the pageSize of the dataSource, but the Q3 release brought the promise of virtualizing local data. Unfortunately, it isn't working.
Thanks in advance!