Using jquery ui autocomplete I need to know the number of items retrieved after calling to the server.
This is my autocomplete
$("#descripcionArticuloEditandoTextBox").autocomplete({
autoFocus: true,
minLength: 3,
source: '@Url.Action("ObtenerArticulos", "Articulo")',
select: function (event, ui) {
articuloModelo = cargarArticulo(ui.item.Id);
articuloSeleccionado();
}
});
Where and how can I get the number of items and/or the collection of items?
Thanks In Advance
Currently there’s no built-in way to do this, but you can provide a function to the
sourceoption and perform your AJAX request manually:In the
successcallback for the AJAX request, you can do whatever you’d like withdata.length.