5 Answers, 1 is accepted
Please take a look at this Telerik Dojo which illustrates a Kendo Grid with a Pager and Filter. Unfortunately, I am unable to replicate your scenario. Please update the attached dojo or create a new one with the behavior of your grid.
For more information about filtering, take a look at this documentation and our helpful demos.
Regards,
Patrick
Telerik
Please See the code below. If I remove the paging filter Works fine.
$(document).ready(function () {
var createGrid = function () {
$("#srchgrd").kendoGrid({
// dataSource: remoteDataSource,
editable: false,
selectable: true,
//schema: {
// data: "d.data",
// total: "d.total"
//},
dataSource: new kendo.data.DataSource({
// serverPaging: true,
sortable: true,
// pageSize: 3,
buttonCount: 5,
filterable: {
multi: true
},
schema: {
data: "d.data",
total: "d.total",
},
transport: {
read: {
url: "/WebForm3.aspx/Getserachres2", //specify the URL which data should return the records. This is the Read method of the Products.asmx service.
contentType: 'application/json', // tells the web service to serialize JSON
type: "POST", //use HTTP POST request as the default GET is not allowed for ASMX
dataType: "json"
},
parameterMap: function (options) {
return kendo.stringify(options);
},
},
}),
// pageable: true,
change: function () {
var row = this.select();
var id = row.data("id");
var gview = $("#srchgrd").data("kendoGrid");
alert("clicked");
//Getting selected item
var selectedItem = gview.dataItem(gview.select());
// alert(selectedItem.DOCK_ACTIVITY_ID);
},
//dataSource: dataSource,
DOCK_ACTIVITY_ID: { type: "number", editable: false },
LOC_ABBR: { type: "string", editable: false },
// BatchId :{ editable: true, nullable: true },
SHIPPER_ACCT_NBR: { type: "number", editable: false },
ORDER_ID: { type: "number", editable: false },
VESSEL_VIN: { type: "string", editable: false },
ShipperName: { type: "string", editable: false },
VesselName: { type: "string", editable: false },
CUSTOMER_PT: { type: "string" },
columns: [
{
field: "DOCK_ACTIVITY_ID",
title: "ID",
width: "10px",
filterable: { multi: true, search: true }
},
{
field: "LOC_ABBR",
title: "Location",
width: "20px",
filterable: { multi: true, search: true }
},
{
field: "SHIPPER_ACCT_ABBR",
title: "Shipper",
width: "20px",
filterable: { multi: true }
},
{
field: "VESSEL_NAME",
title: "Vessel",
width: "20px",
filterable: { multi: true }
},
{
field: "CUSTOMER_PT",
title: "DOCK",
width: "20px",
filterable: { multi: true }
}
]
});
}
createGrid();
$("#btn").click(function () {
var grid = $('#srchgrd').data("kendoGrid");
grid.dataSource.read();
grid.refresh();
});
});
Please take a look at this Kendo Grid using a web service, paging, and filtering.
I made sure to include serverPaging and serverFiltering in order to get all of my results.
Hopefully, this helps clear things.
Regards,
Patrick
Telerik
In order to move forward, please create a small, runnable sample which will help us focus on the specific behavior of your project.
I look forward to your sample.
Regards,
Patrick
Telerik