3

I'm trying to make a combobox in ASP.NET MVC 3.0 where the user can either type in a value in a text field or select a value from a drop down. The user should not be restricted to the values in the select list. The view has a viewmodel, so the values need to be populated and posted to the controller action through model binding.

I've created a decent jquery solution based on the jquery autocomplete widget, but I haven't got it to play well with the MVC unobtrusive javascript validation. I'm making progress with this HtmlHelper extension, but I'm wrestling with UI issues with IE/compatibility mode and my existing CSS. Paying for a control suite like Telerik or Infragistics is not possible. (EDIT: This is a commercial app, so I can't use the free Telerik controls because they are GPL and if you use a GPL component in your app, your entire app becomes GPL).

Does anyone have a great ComboBox for MVC?

0

2 Answers 2

2

See Adding a New Category to the DropDownList using jQuery UI Originally I hacked a jQuery plugin to allow the user to enter a new FK field (in this case Genre or Artist). There is no HTML UI that allows a combobox entry, so I went in another direction. My tutorial also uses the chosen jquery plugin, altho it doesn't allow input.

Sign up to request clarification or add additional context in comments.

Comments

0

I've found the features of the chosen jquery plugin to meet the needs of a javascript-enhanced dropdownlist nicely.

The component is from the Harvest development team. There's a bit of documentation and the download here.

I especially like that it's under MIT license so no ownership or modification rights issues to worry about.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.