<script type="text/javascript">
$(function () {
var dataManager = ej.DataManager({ url: "UrlDataSource", adaptor: new ej.UrlAdaptor() });
var query = ej.Query().take(3);
var execute = dataManager.executeQuery(query)
.done(function (e) {
if (e.actual.result.length) {
$("#Grid").ejGrid({
dataSource: e.actual.result,
...
});
}
});
});
</script> |
Hi, thanks. It works, but in this way I am loosing infinity scroll. How can I set it back with your example ? Infinity scroll works if I set:
dataSource: dataManager
, but I think this is second request.
<script type="text/javascript">
$(function () {
...
$("#Grid").ejGrid({
...
allowScrolling: true,
scrollSettings: { height: 200, allowVirtualScrolling: true },
...
});
...
});
</script> |
<script type="text/javascript">
$(function () {
var dataManager = ej.DataManager({ url: "Home/UrlDataSource", adaptor: new ej.UrlAdaptor() });
...
$("#Grid").ejGrid({
dataSource: dataManager,
...
});
...
});
</script> |
By infinity scroll I mean load the data on demand while scrolling. Now I understand that I need to use 2 requests.
Ok, thx. Everything works.