This is a migrated thread and some comments may be shown as answers.

Manual filter --> Property '_parse' of object [object Object] is not a function

2 Answers 69 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Darren
Top achievements
Rank 1
Darren asked on 13 Sep 2012, 01:18 PM
I'm trying to create a feature which will auto-filter a grid using an input field in the toolbar.  The source can be found at http://jsbin.com/odudud/8.  

I have 2 questions:
  1. Each time I apply my manually-created filter, I get "Property '_parse' of object [object Object] is not a function 
    ".  Can you explain what I might be doing wrong to get this?
  2. Is there a way to filter a Number field so that I can search its contents (i.e., using 'contains' with a Number field)?
Thanks!

2 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay Rusev
Telerik team
answered on 14 Sep 2012, 07:14 AM
Hello Darren,

Type names in JavaScript starts with lower case(try in the console typeof 1), thus you should change the names in model definition. See the following code:
http://jsbin.com/odudud/11/edit

Contains options is only applicable for string type.

Regards,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Darren
Top achievements
Rank 1
answered on 14 Sep 2012, 11:45 AM
Thanks for the prompt response Nikolay.  I based my data types off of the comments within the sample found at http://docs.kendoui.com/api/framework/datasource#schemamodel-objectkendodatamodel.

Although in the same code itself they use the correct lower case version, I was just quickly parsing the comments and found all the supported data types found in this comment:

//data type of the field {Number|String|Boolean|Date} default is String
You may want to update this comment to include the correct letter casing.

Thanks again!

Darren
Tags
Data Source
Asked by
Darren
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Darren
Top achievements
Rank 1
Share this question
or