0
votes
  • I am trying to set(check) List filters of a grid column dynamically from response.
  • I am able to set them but when I open the menu of the corresponding filter and setting some other combination of data to filter dynamically it is getting selected and later cleared.

  • Is the code am using below for setting filters is right?Need help.

     var gridFilter = currentGrid.columns[i].filter;
     gridFilter.setActive(true);
     gridFilter.filter.value="SELECTED,REJECTED"; //putting static data for now
     gridFilter.filter.setValue(["SELECTED", "REJECTED"]);
    
1

1 Answers

0
votes

Best way to add and Edit filter for ExtJs is FilterBy method:

grid.getStore().filterBy(function(rec, id)) { 
    return (rec.get("DynamicRecName")=="DynamicFilterRecord");
}

If you want to edit existing then just remove current filters:

grid.getStore().clearFilters()