Author Topic: Refresh filter select  (Read 2197 times)


  • Pro Enterprise
  • Newbie
  • *
  • Posts: 9
    • View Profile
Refresh filter select
« on: February 02, 2018, 01:48:48 pm »

I have filter select (drop down) with all distinct values for current column.

                        filter: {
                            type: "select",
                            listeners: ['change'],
                            prepend: { '': i18n.t('local:common.pleaseSelect') },
                            options: paramQueryService.getCallbackFilterOptions(),
                            condition: filterCondition

in getCallbackFilterOptions
        return function (ui) {
            var distinctValues: any[] = grid.getData({ 'dataIndx': [ui.dataIndx] });
            return distinctValues;

and filter is working, but I would like to refresh this list in case user change some data in any that column.

Is there any API call that will force filter to call callback function attached to filter.options and refresh items in select? Or is there any other way to do that?
I was playing with
$( ".selector" ).pqGrid( "refresh" );
$( ".selector" ).pqGrid( "refreshDataAndView" );
grid.refreshHeaderFilter({ dataIndx: 'ShipRegion' });
but even it calls that callback, items remains same

If I have to do it manually. I was thinking to listen to cellSave event and to use
grid.getData({ 'dataIndx': [dataIndx] });
to get all distict value, but then to use jQuery to access that select and somehow sync values.

Thank you.


  • Administrator
  • Hero Member
  • *****
  • Posts: 6002
    • View Profile
Re: Refresh filter select
« Reply #1 on: February 02, 2018, 07:20:29 pm »
[ Only Pro members may read this post. ]