Author Topic: Filter in textbox  (Read 3602 times)

queensgambit9

  • Pro Ultimate
  • Sr. Member
  • *
  • Posts: 341
    • View Profile
Filter in textbox
« on: June 02, 2017, 01:58:34 pm »
Would it be possible to set the logic expression when doing a search in a textbox?

Ex:
Code: [Select]
{ title: "Customer Name", dataIndx: "ContactName",
            filter: { type: "textbox", condition: 'contain', listeners: ['keyup']
            }

When doing a search, I would like to change the condition to notcontain. (-searchterm or simliar).

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6255
    • View Profile
Re: Filter in textbox
« Reply #1 on: June 02, 2017, 02:33:46 pm »
column filter condition can't can be changed by getting reference to column

and set it to new value.

column.filter.condition = "new filter condition";
« Last Edit: June 02, 2017, 04:41:21 pm by paramquery »

queensgambit9

  • Pro Ultimate
  • Sr. Member
  • *
  • Posts: 341
    • View Profile
Re: Filter in textbox
« Reply #2 on: June 02, 2017, 03:56:58 pm »
Not sure I understand...what I would like to do is to let the user to have the possibility to switch between conditions.
This might be useful as a standard functionality in pqgrid? Having a ui button to let the user choose which condition to use when using the filter?

Thanks.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6255
    • View Profile
Re: Filter in textbox
« Reply #3 on: June 02, 2017, 04:44:32 pm »
Yes I agree, it would a nice feature to have inbuilt ui in grid to let user choose filter condition at runtime.

It's not available currently; I'm moving it to feature request to be added in the upcoming versions, thank you for the suggestion.