Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 99250

Filtering a Column with a Template

$
0
0
Hello Mathew,

The provided example is showing how to filter the column CategoryID which is added as a separate column. Indeed the example is not working correctly when filtering the column which value is an object.

Filtering is not supported out of the box for columns that are bound to objects.

I can suggest you to check a different example which is filtering an object field, but by ID not by name. The column gets filtered when a CategoryID is typed e.g. (1, 2, 3...):

http://dojo.telerik.com/IhETA 

To be able to filter the column with a string value, I can suggest the following:

- Please remove the type:"number" from the schema.model configuration of the DataSource in order to be able to type string values in the filter textbox.

- Use the existing keydown handler to implement custom logic, which takes the textbox value and checks if it is matching the newItem.text value from the categories array. If a matching item is found, use its numeric newItem.value to filter the Grid dataSource instance.

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#methods-filter

I hope this is helpful.

Regards,
Stefan
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 

Viewing all articles
Browse latest Browse all 99250

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>