This is a migrated thread and some comments may be shown as answers.

Disable inlinecount

6 Answers 626 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Max
Top achievements
Rank 1
Max asked on 20 Jan 2012, 09:09 AM
My data service works with a large database. Getting data from it works OK but trying to get row count results in a timeout.

Is there any way I can stop Kendo sending $inlinecount=allpages in the request to my service? I tried overriding dataSource.transport.parameterMap, dataSource.transport.read.data and dataSource.schema.total but it causes Kendo to crash.

Error: data is undefined
Source File: kendo.all.js
Line: 4864

6 Answers, 1 is accepted

Sort by
0
Max
Top achievements
Rank 1
answered on 24 Jan 2012, 10:31 AM
Is there any way I can display large data? Can Kendo Grid work without requesting row count from the server?
0
Nikolay Rusev
Telerik team
answered on 25 Jan 2012, 09:40 AM
Hello Max,

If you set serverPaging to false the DataSource will require server to return paged data.

All the best,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Max
Top achievements
Rank 1
answered on 25 Jan 2012, 10:19 AM
Hello Nikolay,

serverPaging does not seem to affect $inlinecount parameter value passed to my service. In fact, I see the same request parameters regardless of serverPaging value.
0
Max
Top achievements
Rank 1
answered on 25 Jan 2012, 04:12 PM
Just to clarify what I want. Kendo UI currently gets the data like this:
GET /OData/MyService.svc/MyEntity?$format=json&$inlinecount=allpages&$callback=callback&$top=10&$orderby=ID%20desc

And I want it to get the data like this:
GET /OData/MyService.svc/MyEntity?$format=json&$inlinecount=none&$callback=callback&$top=10&$orderby=ID%20desc
or omit $inlinecount at all:
GET /OData/MyService.svc/MyEntity?$format=json&$callback=callback&$top=10&$orderby=ID%20desc
0
Accepted
Nikolay Rusev
Telerik team
answered on 26 Jan 2012, 10:17 AM
Hello Max,

The remote transport requires total count, however if you disabled serverPaging the DataSource will not send paging context to the service. Thus top and skip will not be available in the query string.

The options of sending mix of this is to implement custom transport.parameterMap,schema.data and schema.total. You can use the following jsFiddle as a sample:
http://jsfiddle.net/TGwNm/

Regards,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Max
Top achievements
Rank 1
answered on 26 Jan 2012, 10:47 AM
Hello Nikolay,

That's exactly what I needed! Thanks!
Tags
Data Source
Asked by
Max
Top achievements
Rank 1
Answers by
Max
Top achievements
Rank 1
Nikolay Rusev
Telerik team
Share this question
or