I need to get all the values (as a list or array) in an igCombo. I think I need to begin the statement with this:
var allParcelYears = $("ddlYearParcelsValuations").igCombo("listItems");
However, I cannot find anywhere how to proceed with the syntax. Data, value, and text seem to be keywords I need but no variation I've tried has worked.
Hello John,
Thank you for posting in our community.
The listItems method of igCombo returns reference to jQuery objects representing all rendered list items in the combo drop down list. What I can suggest in order to get the data of the all combo's items is using the items method that returns array with objects containing following members: data - the associated data, element - the jquery element of the li:
var items = $(".selector").igCombo("items"); var firstItemData = items[0].data; var $firstItemLi = items[0].element;
I have created a small sample illustrating my suggestion, which you can find here. Please test it on your side and let me know wether you find it helpful.
Please let me know if I could be of any further assistance.
Regards,Viktor KombovEntry Level Software DeveloperInfragistics, inc.