setFiltrationLevel error when no header is attached

I would like to dynamically filter treeGrid data using the filterTreeBy method. I do not want to attach a filtering header. When I set the filtration level, as in:
myGrid.setFiltrationLevel(-2);

I get this script error:
‘this.filters.length’ is null or not an object
…/dhtmlx/dhtmlxGrid/sources/ext/dhtmlxgrid_filter.js
Line: 317, Char: 16

However, if I attach a header first using #select_filter, I do not get the above script error when setting the filtration level:
myGrid.attachHeader("#select_filter");

The problem is that I do not really want the user to see the header. Is there another way to avoid the script error? Do I need to specify, in some other way, that the data should be filterable?

The version listed in the dhtmlxgrid_filter.js file that I’m referencing is ‘v2.5 build 91111’.

Thanks!

We have recreated the problem and attached the fixed dhtmlxgrid_filter.js
dhtmlxgrid_filter.zip (4.42 KB)

Thanks! I verified that the fix works.