Author Topic: Local header filtering with initial values  (Read 3254 times)

sbryan

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 6
    • View Profile
Local header filtering with initial values
« on: April 10, 2015, 09:33:52 pm »
I'm trying to use local header filtering on a date column using the between condition.

If I set value: and value2: in my filter they show up in the input fields but the grid isn't filtered until I change one.
Is there a way to make it filter on those values immediately when the grid is displayed?


 

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6255
    • View Profile
Re: Local header filtering with initial values
« Reply #1 on: April 13, 2015, 08:06:03 pm »
You could call the filter method immediately upon grid creation ( in create event for local data / load event for remote data)

Code: [Select]
$grid.pqGrid( "filter", {
    oper: 'add',
    data: [{dataIndx: 'dataIndx of the column', value:'1st value', value2: '2nd value'}]
});

Please let me know if you need any further assistance.

orlando_acevedo

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Local header filtering with initial values
« Reply #2 on: July 20, 2017, 08:00:25 pm »
Perfect. Thank you.