Options count in 4.0 gone?

Since i Version 4.0 i miss the option

dhxCombo.optionsArr.length

to get a count of the loaded option in the combobox. Is there a new way to figure that out?

With best regards,
Uwe Janke

Hello
You can use iterator to coult items, i.e.

var i=0; myCombo.forEachOption(function(){i++;}); console.log(i)
You can try the next code sample:

[code]

Object API init div.combo_info { color: gray; font-size: 11px; padding-bottom: 5px; padding-left: 2px; font-family: Tahoma; } var myCombo; function doOnLoad() { myCombo = new dhtmlXCombo({ parent: "combo_zone", width: 230, filter: true, name: "combo", items: [ {value: "1", text: "The Adventures of Tom Sawyer"}, {value: "2", text: "The Dead Zone", selected: true}, {value: "3", text: "The First Men in the Moon"}, {value: "4", text: "The Girl Who Loved Tom Gordon"}, {value: "5", text: "The Green Mile"}, {value: "6", text: "The Invisible Man"}, {value: "7", text: "The Island of Doctor Moreau"}, {value: "8", text: "The Prince and the Pauper"} ] });
	}
	function optionsCount(){
		var i=0;
		myCombo.forEachOption(function(){i++;});
		alert(i)
	}
</script>

[/code]

Thank you for your quick reply. I had already found Foreach of corse is a option.
I hoped for a property which can do this without the interation.
However it works. Thanks.
Greetings
Uwe

You are welcome!