I have successfully create a Grid with an external datasource. Paging and filtering is activated. Paging without filtering works fine, filtering without paging works fine as well.
What doesn't work is paging a filtered grid. When for example I click on page two, the XHR request is send twice, once with filter parameters applied, once without, almost at the same time. The filtered results gets replaced by an unfiltered one.
Request with filter:
http://localhost:8080/web/app_dev.php/service/kundenstatistik/read?take=25&skip=25&page=2&pageSize=25&filter%5Blogic%5D=and&filter%5Bfilters%5D%5B0%5D%5Bfield%5D=auvtnr&filter%5Bfilters%5D%5B0%5D%5Boperator%5D=eq&filter%5Bfilters%5D%5B0%5D%5Bvalue%5D%5B%5D=117
Request without filter:
http://localhost:8080/web/app_dev.php/service/kundenstatistik/read?take=25&skip=25&page=2&pageSize=25
Can somebody explain why two different requests are triggered by the pager?
Thank you very much
What doesn't work is paging a filtered grid. When for example I click on page two, the XHR request is send twice, once with filter parameters applied, once without, almost at the same time. The filtered results gets replaced by an unfiltered one.
Request with filter:
http://localhost:8080/web/app_dev.php/service/kundenstatistik/read?take=25&skip=25&page=2&pageSize=25&filter%5Blogic%5D=and&filter%5Bfilters%5D%5B0%5D%5Bfield%5D=auvtnr&filter%5Bfilters%5D%5B0%5D%5Boperator%5D=eq&filter%5Bfilters%5D%5B0%5D%5Bvalue%5D%5B%5D=117
Request without filter:
http://localhost:8080/web/app_dev.php/service/kundenstatistik/read?take=25&skip=25&page=2&pageSize=25
Can somebody explain why two different requests are triggered by the pager?
Thank you very much
01.
var
dataSource =
new
kendo.data.DataSource({
02.
type:
"get"
,
03.
transport: {
04.
read: { url:
"service/kundenstatistik/read"
,
05.
dataType:
"json"
06.
}
07.
},
08.
schema: {
09.
data:
"data"
,
10.
total:
"total"
11.
},
12.
pageSize: 25,
13.
serverPaging:
true
,
14.
serverFiltering:
true
,
15.
serverSorting:
true
16.
});
17.
18.
$(
"#grid"
).kendoGrid({
19.
scrolable:
false
,
20.
filterable:
true
,
21.
sortable:
true
,
22.
pageable:
true
,
23.
columns: [
24.
{ title:
"No."
, field:
"aukunr"
, filterable:
false
},
25.
{ title:
"PLZ"
, field:
"plz"
, filterable:
false
},
26.
{ title:
"Ort"
, field:
"ort"
, filterable:
false
},
27.
{ title:
"Land"
, field:
"land"
, filterable:
false
},
28.
{ title:
"ABCD"
, field:
"abcd"
, filterable:
false
},
29.
{ title:
"K-Grp"
, field:
"aukugrp"
, filterable:
false
},
30.
{ title:
"Vertr."
, field:
"auvtnr1"
, filterable:
false
},
31.
{ title:
"Sp"
, field:
"sp"
, filterable:
false
},
32.
{ title:
"Umsatz"
, field:
"umsatz"
, filterable:
false
, format:
"{0:c}"
, attributes:{ class:
"right"
} },
33.
{ title:
"Umsatz CHF"
, field:
"umsatz"
, filterable:
false
, format:
"{0:c}"
, attributes:{ class:
"right"
} }
34.
],
35.
dataSource: dataSource
36.
});