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

Grid Paging makes hits controller multiple times and breaks

2 Answers 246 Views
Grid
This is a migrated thread and some comments may be shown as answers.
don
Top achievements
Rank 1
don asked on 19 Apr 2013, 06:20 PM
I am trying to use the server paging on a Kendo Grid.  However, when I click the a different page the call to the server is made twice.
$("#table").kendoGrid({
dataSource: {
transport: {
read: {
url: "/Analysis/addPortalDatasetstoTable",
data: { dataType: DatasetIdModel.dataType, dimensionsType: DatasetIdModel.dimensionsType, dsId: arr },
type: "POST",
dataType: "json",
traditional: true
}
},

schema: {
data: "data",
total: "total"
},
pageSize: 20,
serverPaging: true
},
height: 430,
filterable: true,
sortable: true,
pageable: true,
columns: [
{ field: "name", title: "Series Name", width: "130px" },
{ field: "category", title: "Category", width: "130px" },
{ field: "value", width: "130px" }
]

});


server call:
public JsonResult addPortalDatasetstoTable(DatasetIdModel model, int pageSize, int skip)

2 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 20 Apr 2013, 04:46 PM
Hello,

Please make sure you have added below JS file only once.

unobtrusive.min.js/unobtrusive.js

Note : Please check above Js file is loaded / gave reference only one time in Page viewSource

Thanks,
Jayesh Goyani
0
Petur Subev
Telerik team
answered on 23 Apr 2013, 07:05 AM
Hello Don,

I checked the online demos and the request is performed only once when changing the page. Could you please provide a live URL or jsbin example which we can check?

Kind Regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
don
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Petur Subev
Telerik team
Share this question
or