ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: nklapper on July 07, 2016, 10:40:25 pm

Title: How to set a static Filter value for a column when using Filter Row
Post by: nklapper on July 07, 2016, 10:40:25 pm
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.
Title: Re: How to set a static Filter value for a column when using Filter Row
Post by: paramvir 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.