ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: jplevene on July 13, 2025, 07:46:19 pm

Title: Column filter on remote source override
Post by: jplevene on July 13, 2025, 07:46:19 pm
I have a grid with multiple columns and different filter options that uses a remote data source.

One column filter (being a range drop down grid), when options are selected, I don't want to trigger a reload or even a filter, I want to call my own function that does it's own thing, does NOT request data to loaded remotely, that has nothing to do with the grid and does not affect the grid.

Is this possible and how can I do it?
Title: Re: Column filter on remote source override
Post by: paramvir on July 14, 2025, 03:27:05 pm
beforeFilter event can be used to hook into filter for specific column(s). return false in this event cancels the remote filter request.

Code: [Select]
beforeFilter: (evt, ui)=>{
if(ui.rules.find(rule=> rule.dataIndx == 'ShipCountry')){
                //do your thing..
return false; //cancel filtering.
}
},
Title: Re: Column filter on remote source override
Post by: jplevene on July 15, 2025, 02:30:20 am
It doesn't work.  "return false" does not prevent the remote data call or even passing the parameters to the remote data call
Title: Re: Column filter on remote source override
Post by: paramvir on July 15, 2025, 06:19:11 am
Setting return false in the beforeFilter event effectively prevents filtering by canceling the remote data request.

You can verify this behavior by using the above code in the example: https://paramquery.com/pro/demos/filter_header

If you're still encountering issues, feel free to share a JSFiddle for further assistance.