I’m building a grid dynamically (not from XML) and wonder how I can add options to a #combo_filter?
I tried this, but it does not work (no options in the combo):
var combo = grid.getColumnCombo(ageColIndex);
combo.addOption(1, 'Test');
I’m building a grid dynamically (not from XML) and wonder how I can add options to a #combo_filter?
I tried this, but it does not work (no options in the combo):
var combo = grid.getColumnCombo(ageColIndex);
combo.addOption(1, 'Test');
Hello
Im using something like this: (where r1 is row id and c1 is column id)
grid.attachEvent("onXLE",function(){
var x = grid.getCustomCombo(r1,c1);
x.put(1,"one")
x.put(2,"two")
x.put(3,"three")
});
Hope it helps
That does not seem to help since I guess you have a combo box in a cell while I’m having one as a filter.
Hello
How about this:
form.getCombo("mycomboName").addOption([
{value: "a", text: "option A"},
{value: "b", text: "option B"},
{value: "c", text: "option C"}
]);
source:
http://docs.dhtmlx.com/doku.php?id=dhtmlxcombo:adding_options
That did not work either.
If I use .getCombo then “.addOption is not a function”.
If I use .getColumnCombo then nothing is shown in the filter list.
To get anything at all to show it seems needed to run grid.refreshFilters(); AFTER all data is added.
Hello
So are you trying add options to combo in form or in grid? Because my firs reply was about grid and second about form and both of them are working for me.
Could you provide your code or demo?
You may try to call refreshFilters() method to update the combo collection:
docs.dhtmlx.com/doku.php?id=dhtm … eshfilters