Is it possible to get the selected items count in the kendoMultiSelect's footerTemplate?
I created a DOJO example with an attemp to use instance.dataItems().length but for some reason, the value is always 0.
$("#customers").kendoMultiSelect({
dataSource: [
{ id: 1, name: "Apples" },
{ id: 2, name: "Oranges" }
],
dataTextField: "name",
dataValueField: "id",
footerTemplate: '#: instance.dataItems().length # item(s) selected'
});
EDIT:
due @Aleksandar comment where he points out
I take his suggestion into account and add his solution as an answer.
OBSOLETE:
Guess it's not in an observable object. One of the possible solutions is to change
footerTemplateevery time a
changehappens onmultiSelect:Example: Footer template update