Column filter

Posted by: bmakhlin on 7 December 2017, 3:31 pm EST

    • Post Options:
    • Link

    Posted 7 December 2017, 3:31 pm EST

    Hi,

    I need to get a reference to a column filter inside function itemFormatter(panel, r, c, cell) function. I need that to find out is filter is being used on any column to change processing logic.

    When I try to wijmo.grid.filter.getColumnFilter(1) I get error “VM68556:1 Uncaught TypeError: wijmo.grid.filter.getColumnFilter is not a function”

    What am I doing wrong? Could please show me how to find if a column has an active filter?

    thank you

    -Boris

  • Posted 11 December 2017, 6:04 am EST

    Hi Boris,

    Just for information, getColumnFilter is not an static method to be used the way you are using. The method can be accessed from FlexGridFilter object only.

    Since, you have Filter applied in the FlexGrid, there should be filter object in PureJs case. If you are using Angular 2/4+, you can get FlexGridFilter reference.

    var filter= new wijmo.grid.filter.FlexGridFilter(grid);
    grid.itemFormatter=function(panel,r,c,cell){
    	colFilter= filter.getColumnFilter(1);
    }
    

    It should work!

    ~Manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels