Author Topic: Filter on 'float' or 'date' type  (Read 2769 times)

wmwa

  • Pro Economy
  • Newbie
  • *
  • Posts: 19
    • View Profile
Filter on 'float' or 'date' type
« on: February 14, 2015, 12:03:04 am »
I'm trying to create functionality similar to the 'Local Filtering' demonstration where a single box filters the entire form. ( http://paramquery.com/pro/demos/filter_local )

In my case, I want the filtering option to always be 'all fields' and would like the filter to be 'contain'. I've modified the example code to account for this, but the problem I've run into is that when it tries to do a 'contain' filter on a field that isn't a string, it blows up.
(Uncaught TypeError: undefined is not a function in pqgrid.min.js)

The grid I'm working with has floats and date values that I'd like to filter on, and they can't be string type, because as strings they do not sort correctly when using the header sort. Any thoughts, or suggestions on this?


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6265
    • View Profile
Re: Filter on 'float' or 'date' type
« Reply #1 on: February 17, 2015, 10:39:16 pm »
contain filter won't work on numbers and dates.

If you want to use it, you need to convert the above data types to string data types and as far as sorting is concerned, you may use custom sorting for those fields.