As its shown below, i'm overriding my read function in transport to send ajax request to get data and set it as datasource for the grid but i also have server side paging enabled with virtual scrolling. But i have noticed that
i see instead of one, multiple requests(at least two) were sent. I read the posts and people are talking about prefetch and fetch issue. Is there any good solution sofar to fix this issue in my case.
var
dataSource = {
transport: {
read:
function
(options) {
var
success =
function
(response) {
options.success(response);
};
var
error =
function
(xhr, status, error) {
Ember.Logger.error(
'Fail response: '
+ xhr.responseText +
' (status='
+ xhr.status +
' '
+ error +
')'
);
};
_this.get(
'PopulateGridData'
)(gridUrl, success, error, options.data,
'POST'
,
true
,
true
);
},
},
pageSize: gridPageSize,
schema: gridSchema,
serverPaging:
true
,
serverSorting:
true
,
serverGrouping:
true
,
serverFiltering:
true
,
};
var
gridOptions = {
dataSource: dataSource,
columns: gridColumns,
editable: gridEditable,
pageable: {
refresh:
true
,
numeric:
false
,
previousNext:
false
,
},
height: gridHeight,
scrollable: {
virtual:
true
,
},
groupable:
true
,
filterable:
true
,
};
var
grid = Ember.$(
"#kendo-grid"
).kendoGrid(gridOptions).data(
'kendoGrid'
);
_this.set(
'kendoGrid'
, grid);