Counting the number of values in a dropdown

Hi

For one of the client side validations i need to check the number of entries present in the dropdown. How to do this. Do we have something like dropdown.size().. i mean, if myList is the id of the dropdown then myList.size().
How to get the number of entries in a dropdown?

If the dropdown was given a valueMap as an Object, one way to do this would be isc.getKeys(item.valueMap}.length.

I have specified optionDataSource for that… the data in dropdowns are populated using optionDataSource…

The easiest thing is probably to use selectItem.dataArrived() and store the number of items as, eg, this.totalItems, then check this stored value from whatever code needs it.