Author Topic: Clear cache of infinite grid when filtering  (Read 2298 times)

MickeyMiner

  • Newbie
  • *
  • Posts: 1
    • View Profile
Clear cache of infinite grid when filtering
« on: February 03, 2017, 01:03:04 am »
hi,

I have built an example based on Infinite Scrolling (https://paramquery.com/demos/infinite_scroll) and it works.
Now I try to add filtering to it. Request gets new set of data, but it displays also previous results in the grid.
My grid has first couple of lines new data, followed by data from previous requests.
If I sort by pressing the column header, the grid shows correct resultset.

Question:
How can I reset/clear the cache explicitly before setting new filter?
Is there any beforeFilter event?

Thanx,

mm

Code: [Select]
var filterObject = [
        { dataIndx: 'lfk', condition: 'equal', value: l_pk },
        { dataIndx: 'tfk', condition: 'equal', value: t_pk }
];
$( "#my_grid" ).pqGrid( "filter", {
    oper: 'replace',
    data: filterObject
});