Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
132477 | Sep 4,2017 05:58 PM UTC | Sep 7,2017 04:05 AM UTC | JavaScript | 5 |
![]() |
Tags: ejGrid |
<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.
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
or the page will be automatically redirected to sign-in page in 10 seconds.