I can’t seem to find a way to refill the filters with the current data in the column.
for example
if you have 2 columns with 4 rows.
in column 1 you have A , A , C , C
in column 2 you have 1 , 2 , 3 , 4
if I use the myGrid.attachHeader("#combo_filter,#combo_filter"); and set the first filter to only show A, the second filter still has the option to filter on
3 and 4.
Is there a way to remove 3 and 4 out of the filterbox in the second column?
If you don’t mind patching the js code of component, it can be done by changing one line of a code. In sources, dhtmlxgrid_filter.js, line 84
dhtmlXGridObject.prototype.collectValues=function(column){
...
var col=this._f_rowsBuffer||this.rowsBuffer;
Can be changed to
var col=this.rowsBuffer;
Now if you call grid.refreshFilters(); list of filters will show only options for visible items.
We do not plan to make this mode public, as it will update all collections of options, including the options of already selected filters. Which mean that user will not be able to switch to next filtering option without selecting blank records first.