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

[Solved] "Expected token" when filtering with functions

2 Answers 22 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Marco
Top achievements
Rank 1
Marco asked on 02 Apr 2012, 02:02 PM
I have to use client filtering in my current project; with "normal" expressions like: "PK_Random~eq~value" the filter works like a charm, but when I use the substring / startswith / endswith methods the debugger spit me a filterParserException with the "Expected Token" error, this is the JS code:

 <script type="text/javascript">
     function filter() {
         var grid = $("#gridID").data("tGrid");
         grid.filter("substringof(someName, 'Somevalue')");
     };
 </script>


I call this function with an onlick event binded to a button.
The model passed to the grid is created from a view in the db.
The telerik's version I'm using is: 2011.3.1115

2 Answers, 1 is accepted

Sort by
0
Marco
Top achievements
Rank 1
answered on 03 Apr 2012, 01:01 PM
I've upgraded the project to the last version (2012.1.214). The problem still persists.

UPDATE: Solved.
0
Petur Subev
Telerik team
answered on 03 Apr 2012, 01:54 PM
Hello Marco,

To make things work you should remove the 'space' after the comma in your expression.

Regards,
Petur Subev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
Tags
Grid
Asked by
Marco
Top achievements
Rank 1
Answers by
Marco
Top achievements
Rank 1
Petur Subev
Telerik team
Share this question
or