Filter on grid colums of type "combo". DHTMLX 4.6

Hello:

I want to put filters on several columns of type “combo” in a grid.

I used the examples http://forum.dhtmlx.com/viewtopic.php?f=21&t=18372 and http://forum.dhtmlx.com/viewtopic.php?f=2&t=50987, but the object “combo” in the method “filterGrid” sprouts null.

I’m using the version 4.6 of DHTMLX.

Thanks in advance.

Please, note that the PRO version is required. Also pleas,e make sure the the dhtmlxCombo library is included on your page.

We use the pro version on our project.
I included the link to the dhtmlxCombo library, with the files “/js/dhtmlx46/dhtmlxCombo/codebase/dhtmlxcombo.js” and “/js/dhtmlx46/dhtmlxCombo/codebase/dhtmlxcombo_deprecated.js” but the method “getColumnCombo” still returns a null object.

[code]
var grid;

grid.attachHeader(",#text_filter,#select_filter,#select_filter,#numeric_filter,#numeric_filter");
grid.setColumnIds(“idVal,descVal,nivelVal,ambVal,inicioVal,finVal”);
grid.setInitWidths(“0,*,100,150,100,100”);
grid.setColTypes(“ro,edtxt,combo,combo,edn,edn”);

grid.attachEvent(“onCollectValues”,collectComboValues);
grid.attachEvent(“onFilterStart”,filterGrid);
[…]

function collectComboValues(index){
if (index==2 || index==3){
var c={}; var f=[];

    for (var i=0; i<this.getRowsNum(); i++){
        this.render_row(i);
        var text=this.cellByIndex(i,index).getTitle();
        c[text]=true;
    }

   for (d in c) 
      if (c[d]===true) f.push(d);
    
   return f.sort();
}

}

function filterGrid(indexes,values){
var i=indexes.indexOf(2);
if (i==1 && values[i]){ // column “nivelVal”
var combo=grid.getColumnCombo(2);
var combo_value=combo.getOptionByLabel(values[i]).value;
this.filterBy(2,function(value){
return (value.toString().toLowerCase()==combo_value.toString().toLowerCase());
});
return false;
}
if (i==2 && values[i]){ // column “ambVal”
var combo=grid.getColumnCombo(3);
var combo_value=combo.getOptionByLabel(values[i]).value;
this.filterBy(3,function(value){
return (value.toString().toLowerCase()==combo_value.toString().toLowerCase());
});
return false;
}
return true;
}[/code]

Thank you for all your assistance.

Could you please, open ticket at support.dhtmlx.com and share with a demo link or provide with a simplified complete demom where the problem can be reconstructed locally.
Here you can find a tutorial about creating a complete demo:
docs.dhtmlx.com/tutorials__auxil … pport.html