Grid combo filter with dynamic xmlcontent

I’ve tried to find example regarding the problem I have but no luck. So - I wonder if anyone has a solution to the problem that I have…

Ok - I got a dhtmlxgrid where a couple of columns are defined as ‘xmlcontent’:

<cell xmlcontent="1" source="../wsGate?ws=45&style=INCA&patype=C&coid=489&init=Bitte Eyton" filter="true" cache="true" auto="true" text="Bitte Eyton">113694</cell>

This is all well - the name of the user is displayed in the grid - coming from the ‘text’-attribute. And when I start typing in the cell’s (combo) editor, it performs a lookup from the ‘source’ specified in the xml.

This all works well and is not a problem - the problem is when I want to have a (combo) filter on the grid itself. The combo-filter does not use the cell’s ‘text’ to create the options, but rather the cell’s value, i.e. the id. Se the result looks something like this.

We need to be able to perform a lookup when selecting a value (user or whatever), since you may have thousands of entries, which makes the page very slow.

So - what I want is that the ‘combo_filter’ uses the ‘text’, rather than the ‘value’ of the cell to make the list of options.

Is this possible? Or is there another way to achieve what I want?

Try using the onCollectValues() method, in this method, do a for loop for each row and in that, return the values as cell.getTitle() instead of cell.getValues().

Please, try to use the following temporary workaround:

mygrid.attachEvent("onEditCell",function(stage,id,index){ if(index==2&&stage==2) updateComboFilter(index) return true }) ... mygrid.loadXML("../common/combo.xml",function(){ updateComboFilter(2) });

[code]function updateComboFilter(index){
var combo = mygrid.getFilterElement(index);
var options = [[""," "]];
var values = {};
var text = this.cells(id,2).getText();
var value = this.cells(id,2).getValue();
values[text] = 1;


Works perfectly.