Author Topic: How to set a static Filter value for a column when using Filter Row  (Read 1970 times)

nklapper

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 17
    • View Profile
Hello,

I have a grid with a filter row for all columns, and it works fine. 

Now I need to hardcode a filter value for one particular column, e.g. WHERE `columndate` >= someTimeStamp, while still allowing user controlled filtering for all the other columns.

What is the best way to accomplish this?  Can you provide an example?

Thanks.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: How to set a static Filter value for a column when using Filter Row
« Reply #1 on: July 08, 2016, 09:43:50 am »
That is similar to setting initial filtering. Example: http://paramquery.com/pro/demos/filter_initial

Just add this in your column definition.

Code: [Select]
filter: {condition: 'gte', value: "07/12/1996", on: true, type: 'textbox', attr: 'disabled'}

Points to note:
1. on: true
2. value: (valid javascript date)

type: 'textbox' can be kept or removed depending on whether you want to show the filter value to the users.
« Last Edit: July 08, 2016, 09:46:02 am by paramquery »