Hi
I have an issue with the paging block at the bottom of the grid (where pages numbers buttons and items number are located). At the first rendering of the page, this paging block is not initialized. My grid contains 2 pages of 5 items each but the paging block only displays 1 page button, with the number "0" and the text "No items to display".
If I sort the data (by clicking on a column header), the paging block is properly initialized.
I have no clue of what I'm doing wrong.
Here is my cshtml code :
Here is the result of my json request /Countries/AllCountries :
Thanks for helping
I have an issue with the paging block at the bottom of the grid (where pages numbers buttons and items number are located). At the first rendering of the page, this paging block is not initialized. My grid contains 2 pages of 5 items each but the paging block only displays 1 page button, with the number "0" and the text "No items to display".
If I sort the data (by clicking on a column header), the paging block is properly initialized.
I have no clue of what I'm doing wrong.
Here is my cshtml code :
$(
"#grid"
).kendoGrid({
dataSource: {
type:
"json"
,
transport: {
read:
"/Countries/AllCountries"
,
},
schema: {
data:
"data"
},
pageSize: 5
},
groupable:
false
,
sortable:
true
,
pageable:
true
,
filterable:
true
,
});
Here is the result of my json request /Countries/AllCountries :
{
"data"
:[
{
"Id"
:1,
"Name"
:
"Japan"
},
{
"Id"
:2,
"Name"
:
"South Africa"
},
{
"Id"
:3,
"Name"
:
"United States"
},
{
"Id"
:4,
"Name"
:
"Albania"
},
{
"Id"
:5,
"Name"
:
"Germany"
},
{
"Id"
:6,
"Name"
:
"France"
},
{
"Id"
:7,
"Name"
:
"Sweden"
},
{
"Id"
:8,
"Name"
:
"UK"
},
{
"Id"
:9,
"Name"
:
"Marocco"
},
{
"Id"
:10,
"Name"
:
"Argentina"
}]}
Thanks for helping