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

Kendo Grid take and Skip Parameters for Jquery Load

1 Answer 1156 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rajendra
Top achievements
Rank 1
Rajendra asked on 25 Feb 2016, 02:26 PM

I am loading the Kendo grid  with Jquery Ajax call as following.  I am trying add Paging to Grid Unable  but do not know where put the Paging info because data is loaded from Jquery.  Where and how should   pass the parameter take and Skip Parameters ? 

 var srchResuls = function () {

                $.ajax({
                    url: "/Default.aspx/Getserachres",
                    type: "post",
                    dataType: "json",
                    contentType: "application/json; charset=utf-8",
                    
                    
                    success: function (result) {
                        searchResults = result;
                    }
                }).done(function () {
                    var dataSource = new kendo.data.DataSource({
                        data: searchResults.d,
                       
                        schema: {
                            model: {
                                id: "DOCK_ACTIVITY_ID",
                                fields: {
                                    DOCK_ACTIVITY_ID: { type: "number", editable: false },
                                    LOC_ABBR: { type: "string", editable: true },
                                    // BatchId :{ editable: true, nullable: true },
                                    SHIPPER_ACCT_NBR: { type: "number", editable: false },
                                    ORDER_ID: { type: "number", editable: false },
                                    VESSEL_VIN: { type: "string" },
                                    CUSTOMER_PT: { type: "string" }


                                }
                            },
                        }
                    });
                    var grid = $('#srchgrd').data("kendoGrid");
                    dataSource.read();
                    grid.setDataSource(dataSource);
                //    grid.change=rowselected;
                });
            };

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 29 Feb 2016, 09:43 AM

Hello Rajendra,

With the setup shown in the provided code snippet, it is only possible to use in-memory operations. If you need to handle operations such as paging, sorting, filtering etc. on the server data should be supplied via the DataSource transport.

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