Hi,I'm using an igCombo control with the multiSelection option. When multiple items are selected the input field shows all selected items separated by comma.Is it possible to change that text to something like 'n items selected'. I tried using the "text" method, but that clears the selection.
Hello Robin,
I am currently investigating this behavior and will try to suggest accordingly afterwards. I will keep you posted with my findings. Thank you for your patience as I'm working though this.
Hi,
I tried your solution and it works if the drop down list is closed by clicking outside of the control. But when closing the drop down with the drop down button and then clicking somewhere else, the text still changes back.
I suggest that you set this on the dropDownClosed event:
dropDownClosed: function (evt, ui) { var count = ui.owner.element.igCombo("values").length; ui.owner.element.val(count + " Selected"); }
I tested it and it seems to work just as you would like it to. Please test it and let me know if you have further questions on the matter.
I have tried to come up with a solution using .val().
The text is set during the selectionChanged event, but when the igCombo control looses focus, the text is changed back again.
Thank you for posting in the Infragistics community !
I suggest that you use jQuery to set the value for the input field using .val(). This will change the text in the field and will NOT clear the selection:
$(".ui-igcombo-field").val("some text")
Please let me know if you have any further questions on the matter.