I would like to confirm if anybody has gotten this behavior with server grouping and virtual scroll bar enabled.
When I used the scroll bar to drag down half the page, the grid fires off a take and skip post request to my server and gets returned some groups. But when I use the scroll bar from here, the last request two requests (and sometime other requests) get fired off consecutively without completion almost like on a infinite loop. The developer console in the browser logs an never ending repeat of two previous (or current) requests over and over again. Sometimes when sing the scroll wheel after paginating the server grouping, will trigger off a constant stream requests.
I have included my grid settings below.
var grid = $(
'#kendo-table'
).kendoGrid({
dataSource: {
type:
"json"
,
serverPaging:
true
,
serverSorting:
true
,
serverFiltering:
true
,
serverGrouping:
true
,
pageSize: 10000,
schema:schema,
transport: {
// "Posting sorting parameters to back end"
read: {
type:
"POST"
,
url: restApiHost,
contentType:
"application/json"
,
beforeSend: _beforeSendXHRModifier,
data:{
// this is custom, it defines the raw report we show
targetTable:targetTable
}
},
parameterMap:
function
(data,type){
if
(type ===
"read"
){
// maps data to the post request, things that are mapped are like: pageSize, skip, take, ect
console.log(
"paramterMap on: "
);
console.log(data);
return
kendo.stringify(data);
}
}
},
},
height: height,
scrollable: {
virtual:
true
},
pageable:{
refresh:
true
,
previousNext:
false
,
numeric:
false
,
messages: {
display:
"Loaded {0}-{1} from virtualizing {2} data items"
}
},
groupable:
true
,
sortable:
true
,
selectable:
'multiple cell'
,
reorderable:
true
,
resizable:
true
,
columns: columns,
filterable:
true
,
filterMenuInit: _onFilterMenuInit,
}).data(
"kendoGrid"
);
grid.bind(
'dataBound'
,
function
(e){
console.log(
"dataBoundEvent without new grid instance"
);
var
gridDataSource = e.sender.dataSource;
if
(gridDataSource.group().length > 0) {
//the grid is grouped
$(
"#kendo-table"
).find(
".k-icon.k-i-collapse"
).trigger(
"click"
);
console.log(
'Lets start grouping, expanding will trigger ajax call on elements of this group'
);
}
});