jquery ui autocomplete is changing my listbox

Posted by oo on Stack Overflow See other posts from Stack Overflow or by oo
Published on 2010-04-01T12:37:59Z Indexed on 2010/04/01 12:53 UTC
Read the original article Hit count: 657

I am trying to change my comboboxes to use autocomplete so i leverage the code listed here (which worked perfectly for my dropdowns)

The issue is that i also on the same page have a listbox with the following code:

<%= Html.ListBox("Cars", Model.BodyParts.Select(
                    x => new SelectListItem {
                        Text = x.Name,
                        Value = x.Id,
                        Selected = Model.CarsSelected.Any(y => y.Id == x.Id)
                    }
               ))%>

and it appears that the jquery ui code is changing this to a autocomplete dropdown as well (as opposed to keeping it as a multi select list box)

any idea how to prevent this from happening?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui