Hi i am having trouble in adding PAger. I have search function which is called from couple of location which is bring data using Jquery. Code working fine and displaying the data but unable to add the Paging.
var
srchResuls =
function
() {<br>
var
pg = 1;<br> $(
"#srchgrd"
).data(
"kendoGrid"
).dataSource.query({<br> page: pg,<br> pageSize: 2<br> });<br> $.ajax({<br> url:
"Docktst.aspx/Getserachres"
,<br> type:
"post"
,<br> dataType:
"json"
,<br> contentType:
"application/json; charset=utf-8"
,<br> <br><br> success:
function
(result) {<br> searchResults = result;<br> }<br> }).done(
function
() {<br>
var
dataSource =
new
kendo.data.DataSource({<br> data: searchResults.d,<br> <br> <br> schema: {<br> model: {<br> id:
"DOCK_ACTIVITY_ID"
,<br> fields: {<br> DOCK_ACTIVITY_ID: { type:
"number"
, editable:
false
},<br> LOC_ABBR: { type:
"string"
, editable:
true
, filterable: { multi:
true
, search:
true
} },<br>
// BatchId :{ editable: true, nullable: true },<br> SHIPPER_ACCT_NBR: { type: "number", editable: false },<br> ORDER_ID: { type: "number", editable: false },<br> VESSEL_VIN: { type: "string" },<br> CUSTOMER_PT: { type: "string" }<br><br><br> }<br> },<br><br> pageable: {<br> <br> pageSize: 2,<br> buttonCount: 1<br> },<br><br> serverSorting: true,<br> sort: { field: "DOCK_ACTIVITY_ID", dir: "desc" },<br><br> parameterMap: function (data) {<br> return JSON.stringify(data);<br> }<br><br> }<br> });<br>