filter in header

Hi all,

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?

Forgot to say, I’m very new to javascript.

Unfortunately such feature is not available for the dhtmlxGrid filters.

Hmm thats sad.

Are there any intentions to implement that?

Unfortunately it is not available to implement such feature in the near future.


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.

Hi thx for the response. For the moment we will leave it like it is.

But I do see a use for anoter report I have to make. I will try it then and see what the results are.