Hi,
I'm using client side grid dataSource filter: kendo.data.DataSource.filter with operator: "eq", but it returns case insensitive results.
For example:
<script>
var dataSource = new kendo.data.DataSource({
data: [
{ firstName: "joe", lastName: "doe" },
{ firstName: "Joe", lastName: "Doe" }
]
});
dataSource.filter( { field: "lastName", operator: "eq", value: "doe" });
var view = dataSource.view();
console.log(view.length);
</script>
returns 2.
Is there a way to make it case sensitive?
Thanks,
-Yuriy
5 Answers, 1 is accepted
The case-insensitive filtering is switched by default. In order to make it case-sensitive you can use filterable ignoreCase option:
http://docs.telerik.com/kendo-ui/api/aspnet-mvc/Kendo.Mvc.UI.Fluent/GridBoundColumnFilterableBuilder#methods-IgnoreCase(System.Boolean)
Regards,
Pavlina
Telerik

Hi Pavlina,
Thank you for quick turnaround on it, but the proposed solution works only on dataSource with static binding. I need it to work on dynamic one. There are couple of examples below, based on your demos:
static: http://dojo.telerik.com/AYUsi
dynamic: http://dojo.telerik.com/EFAwa (filter on button1 click event)
Is there any other way around it?
Thanks,
-Yuriy
When serverFiltering is turned on as it is in the case with remote service data (http://dojo.telerik.com/EFAwa) it is developer responsibility to filter the data on server side in case-sensitive manner and send back the filtered data set. Please note that Kendo UI is a client-side framework and such assistance related to the server side implementation is out of the scope of our support services.
Regards,
Pavlina
Telerik

Hi Pavlina,
It wan't my intention to make it server driven filter. I just copied demo example with remote data binding. Anyway, combining dataSource propetry serverFiltering:false (or simply removing it) or dataSource.ServerOperation(false) (in case of ASP.NET MVC) with filter param "ignoreCase:false" solves it.
Thanks,
-Yuriy
In case disabling server filtering is applicable solution for your scenario you can proceed this way. Do not hesitate to contact us again in case further questions arise.
Regards,
Pavlina
Telerik