Results 1 to 2 of 2

Thread: How to programatically set the filter string in a grid filter

  1. #1
    Sencha User
    Join Date
    Jan 2017
    Posts
    16

    Default How to programatically set the filter string in a grid filter

    Hi,

    I would appreciate some tips on the following:
    I want to programatically set the filter string to be applied in one of the columns of a grid, as if a user has typed in this string in the text box of the column's filter drop down menu.
    I have tried some variants in this Fiddle https://fiddle.sencha.com/#view/editor&fiddle/317n, but couldn't get it to work.

    I'm using Sencha 6.2.0 Classic.

    Regards, Siebrand

  2. #2
    Sencha User
    Join Date
    Jan 2017
    Posts
    16

    Default

    I found the solution to my question here: https://stackoverflow.com/questions/25975456/how-to-use-gridfilters-plugin-and-programmatically-clear-set-the-filters

    Use the filter instance on the respective column:

    var column = grid.columnManager.getColumns()[2];
    column.filter.setValue('Ready');
    column.filter.enable();

    I have updated my Fiddle with this solution: https://fiddle.sencha.com/#view/editor&fiddle/317n


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •