This is a migrated thread and some comments may be shown as answers.

How can I get the count of number of items in the combo?

1 Answer 430 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Kjell
Top achievements
Rank 1
Kjell asked on 02 Mar 2012, 04:58 AM
My comboboxes are populated dynamically and I want them to be required, but only if there is more than one option.  I think I know how to do the validation, but how can I get the item count for combobox?

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 02 Mar 2012, 12:39 PM
Hello,

 
You can use the DataSource data() method and get the length of the items:

combobox.dataSource.data().length


All the best,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ComboBox
Asked by
Kjell
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or