kendo-ui-grid


kendo grid Uncaught TypeError: Cannot read property 'slice' of undefined


Fairly new to it and trying to use paging with kendo datagrid (2.2015)
Had it working without paging but paging requires the total record count be returned in the data so I changed the json result from the web service to look like this:
{
"total":98,
"data":[
{"ID":164,"Name":"ABRAHAM, ALBERTA","Phone":"(111) 222-7240","Row":1},
{"ID":173,"Name":"ABRAHAM, SERENA","Phone":"(111) 222-4067","Row":2},
{"ID":213,"Name":"ADAMS, RONNIE","Phone":"(111) 222-0273","Row":3},
{"ID":151,"Name":"ADDISON, RAYMOND \u0026 SUE","Phone":"111-222-6252","Row":4},
{"ID":175,"Name":"ALEXANDER, FRANKLIN","Phone":"(111) 222-6839","Row":5}
]
}
page size is 5 and defined in the datasource which is here:
Search.clientDataSource = new kendo.data.DataSource({
transport: {
read: {
url: myUrl,
dataType: "json",
type: "get"
}
},
pageSize: 5,
serverPaging: "true",
schema: {
total: "total",
data: "data"
}
});
The above as far as I can tell is 'by the book' and matches all I've read on the subject.
(The comments below may be red herring)
When I had it working without paging the data was returned in an unnamed array and in the schema I used this:
schema: {
data: function (response) {
var obj = JSON.parse(response);
return obj;
}
}
which worked but I have never seen any examples of it being done this way, I assumed it was because the array returned was unnamed, all examples showed the schema using the data: "data" where data is the name of the array. If I used this on my unnamed array I got the slice error, again I assumed this was because there was no data array to slice up.
So now that I've cleaned up all that why is my paging supported data throwing this error?

Related Links

How send page number in KendoUI Filter in server side
ToolBar kendo UI error
kendo grid Uncaught TypeError: Cannot read property 'slice' of undefined
Weird error when trying to call function from button in Kendo UI grid
Kendo UI grid pagination issue
kendo Grid - Sub column values got wrongly mapped when reordering the Column

Categories

HOME
winforms
variables
hook
gerrit
google-play
react-virtualized
cplex
amazon-ecs
cakephp-2.5
v8
ckeditor
azure-storage-tables
swagger-ui
webrequest
synchronization
gitpitch
kentor-authservices
modelica
etl
collectd
usergrid
clearcase-ucm
lombok
ghc
foselasticabundle
after-effects
tostring
sms-gateway
nhibernate-envers
crystal-reports-2008
jtextfield
ml
clickonce
buildbot
intel-pin
fabric8
junit5
gtrendsr
bower-install
dosbox
serve
retina-display
c11
node-gyp
midl
bootstrap-dialog
total-commander
flickr-api
upstart
atomicity
jquery-nestable
powercli
rdfs
brightcove
nodebb
mediaelement
topbeat
pintos
time-and-attendance
wdf
url-masking
file-writing
markojs
testng-dataprovider
captivenetwork
nessus
deis
cakephp-3.1
unity3d-gui
census
dereference
skos
notify
tween
asp.net-dynamic-data
code-access-security
message-driven-bean
java.nio.file
cdc
soundtouch
jelly
cascalog
newtonscript
dbproviderfactories
dotnethighcharts
cufon
whoosh
qt-jambi
vdsp
invite
servicehost
inotifycollectionchanged
pyinotify
xsdobjectgen
bespin
database-management
user-friendly
boost-smart-ptr

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App