Pager error in Kendo Grid(Nan-Nan of 1 items)

后端 未结 7 1409
执笔经年
执笔经年 2021-01-17 15:51

I am trying to create a Kendo grid with a list of student details. On click of the add button, the pager shows \"Nan-Nan of 1 items\".

@(Html.Kendo().Grid<         


        
7条回答
  •  情话喂你
    2021-01-17 16:29

    You need to define the pageSize in the grid data source. Not in the success function.

    In your case you only need to include in your data source the following:

     $.ajax({
                    url: '../Student/GetStudentDetails?StudentId=' + Data.StudentId,
                    type: 'POST',
                    contentType: 'application/json',
                    dataType: 'json',
                    pageSize: 10,
                    success: function (data) {...
    

    I hope this helps. More information at: Sudarsan Dash'blogs

提交回复
热议问题