Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2225
Limiting input on drop down list.
posted

Limiting input on drop down list.

I have a field for which the user should only be able to select a value from the list.
I have set this up using an infragistics editor and the drop down is working. However, the user is still able to modify the input by typing. I want to limit them to whatever is in the drop down. How can I do this?
I am using  MVC3 and Razor. Here is a snippet:


@(Html.Infragistics().TextEditorFor(model => model.Type)
.ID("Type")
.ListItems(new List<string>() { "Item1", "Item2"})
.ListDropDownAsChild(true)
.ButtonType(TextEditorButtonType.DropDown)
.RenderInContainer(true)
.Width(200)
.TextMode(TextEditorTextMode.Text)
.SelectionOnFocus(TextEditorSelectionOnFocus.SelectAll)
.Required(true)
.ValidatorOptions(m => m.OnSubmit(true).OnChange(true).OnBlur(true).ShowIcon(true).KeepFocus(ValidatorKeepFocus.Never).FormSubmit(true))
.Render())

Parents
No Data
Reply Children
No Data