This question is locked. New answers and comments are not allowed.
Data Source has:
serverFiltering: true,
Grid has:
filterable: true,
When the Filter is selected from the columnMenu, nothing goes across the wire per Fiddler and the C# breakpoint is not hit. (Sorting server-side on this grid works fine, HttpGet breakpoint in the Controller is hit for every change.)
And fyi the filter doesn't seem to work at all in Chrome, it won't accept a text value to search.
For the browsers where it works, do I have to do something else to enable the grid to Filter on the server?
serverFiltering: true,
Grid has:
filterable: true,
When the Filter is selected from the columnMenu, nothing goes across the wire per Fiddler and the C# breakpoint is not hit. (Sorting server-side on this grid works fine, HttpGet breakpoint in the Controller is hit for every change.)
And fyi the filter doesn't seem to work at all in Chrome, it won't accept a text value to search.
For the browsers where it works, do I have to do something else to enable the grid to Filter on the server?
3 Answers, 1 is accepted
0
Hello David,
Daniel
the Telerik team
There was a problem with the column menu filter in the service pack. Could you check if updating to the latest official release resolves the problem? If the Grid still cannot be filtered, could you provide the code you are using or a small runnable sample so I can check the setup?
Regards,Daniel
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
0
David
Top achievements
Rank 1
answered on 28 Mar 2013, 04:13 PM
OK, I'll look for the latest download. Can you post a link to the right one?
In the meantime, here is a sample, very simple, the same on all my girds, none work to filter.
View:
@{
ViewBag.Title = "MasterCats";
}
<link href="~/media/css/GridLarger.css" rel="stylesheet" />
<h2>MasterCats</h2>
<script src="~/Scripts/kendo/2012.3.1315/kendo.aspnetmvc.min.js"></script>
<div id="masterCat2_grid"></div>
<script>
$(document).ready(function () {
$("#masterCat2_grid").kendoGrid({
columns: [
{ field: "Code", title: "Code", width: "70px" },
{ field: "Name", title: "Name", width: "450px" },
{ field: "IsPrecontract", title: "IsPrecontract", width: "120px", template: "#= (IsPrecontract == 'Y') ? '<span class=\"alignCenter\">Y</span>' : 'N' #" },
{ field: "IsActive", title: "IsActive", width: "120px", template: "#= (IsActive == 'Y') ? 'Y' : '<span class=\"alignCenter\">N</span>' #" },
{ command: "destroy", title: "Action", width: "120px" }
],
dataSource: ds,
pageable: true,
columnMenu: true,
filterable: true,
sortable: true,
toolbar: ["create", "save", "cancel"],
editable: {
update: true,
confirmation: "Really delete this record?"
}
});
});
</script>
<script src="~/ViewModels/MasterCat2ViewModel.js"></script>
<!-- Note: Kendo Scripts added at the _Layout Level -->
View Model:
var ds = new kendo.data.DataSource({
transport: {
read: {
url: "../api/MasterCat2/",
type: "GET",
dataType: "json"
},
create: {
url: "../api/MasterCat2/",
type: "PUT"
},
update: {
url: "../api/MasterCat2/",
type: "POST",
dataType: "json",
success: function () {
alert("success");
},
destroy: {
url: "../api/MasterCat2/",
type: "DELETE",
dataType: "json"
}
},
parameterMap: function (options) {
return JSON.stringify(options);
},
change: function () {
alert("change");
}
},
pageSize: 10,
serverFiltering: true,
schema: {
data: function (response) {
return response.Data;
},
total: function (response) {
return response.Total;
},
errors: function (response) {
return response.Errors;
},
aggregates: function (response) {
response.AggregateResults;
},
//parse: function(response) {
// return response.Data;
//},
model: {
id: "Code",
fields: {
"Code": { nullable: false, editable: true },
"Name": { editable: true },
"IsPrecontract": { editable: true },
"IsActive": { editable: true }
}
}
}
});
In the meantime, here is a sample, very simple, the same on all my girds, none work to filter.
View:
@{
ViewBag.Title = "MasterCats";
}
<link href="~/media/css/GridLarger.css" rel="stylesheet" />
<h2>MasterCats</h2>
<script src="~/Scripts/kendo/2012.3.1315/kendo.aspnetmvc.min.js"></script>
<div id="masterCat2_grid"></div>
<script>
$(document).ready(function () {
$("#masterCat2_grid").kendoGrid({
columns: [
{ field: "Code", title: "Code", width: "70px" },
{ field: "Name", title: "Name", width: "450px" },
{ field: "IsPrecontract", title: "IsPrecontract", width: "120px", template: "#= (IsPrecontract == 'Y') ? '<span class=\"alignCenter\">Y</span>' : 'N' #" },
{ field: "IsActive", title: "IsActive", width: "120px", template: "#= (IsActive == 'Y') ? 'Y' : '<span class=\"alignCenter\">N</span>' #" },
{ command: "destroy", title: "Action", width: "120px" }
],
dataSource: ds,
pageable: true,
columnMenu: true,
filterable: true,
sortable: true,
toolbar: ["create", "save", "cancel"],
editable: {
update: true,
confirmation: "Really delete this record?"
}
});
});
</script>
<script src="~/ViewModels/MasterCat2ViewModel.js"></script>
<!-- Note: Kendo Scripts added at the _Layout Level -->
View Model:
var ds = new kendo.data.DataSource({
transport: {
read: {
url: "../api/MasterCat2/",
type: "GET",
dataType: "json"
},
create: {
url: "../api/MasterCat2/",
type: "PUT"
},
update: {
url: "../api/MasterCat2/",
type: "POST",
dataType: "json",
success: function () {
alert("success");
},
destroy: {
url: "../api/MasterCat2/",
type: "DELETE",
dataType: "json"
}
},
parameterMap: function (options) {
return JSON.stringify(options);
},
change: function () {
alert("change");
}
},
pageSize: 10,
serverFiltering: true,
schema: {
data: function (response) {
return response.Data;
},
total: function (response) {
return response.Total;
},
errors: function (response) {
return response.Errors;
},
aggregates: function (response) {
response.AggregateResults;
},
//parse: function(response) {
// return response.Data;
//},
model: {
id: "Code",
fields: {
"Code": { nullable: false, editable: true },
"Name": { editable: true },
"IsPrecontract": { editable: true },
"IsActive": { editable: true }
}
}
}
});
0
Hello David,
Daniel
the Telerik team
The latest release is available for download from your account by logging in and navigating to:
- Manage Products > DevCraft Complete.
- Download installer and other resources.
- Kendo UI Web(or Kendo UI Complete for ASP.NET MVC if you are using the wrappers) > download.
The version of the release is 2013.1.319.
The code looks OK. There are a few minor errors:
- the destroy configuration is added within the update configuration.
- change is an event of the dataSource.
but nothing that would cause the problem with the filtering.
Daniel
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.