Get all options for a item type combo in form

Hello,

Is there any way I can get all the options of a combo created using XML item type=“Combo”. I was able to get the combo object but unable to get the list of options in this combo. Please help.

var comboobj = myForm.getCombo(‘combos’);

Any help on this would be great.

Hello
There is no ready method, but you can iterate options and push in an array/objet the next way:

var i = myCombo.getOptionsCount(); ... myCombo .getOptionByIndex[i]

When I try to use var i = myCombo.getOptionsCount();, I see error “Object doesn’t support this property or method.”

So, you use old version. This method was added in 4.0. You need to update your dhtmlx to use this functionality