I need to set a combobox to "readonly" in MVC. Is this possible? I don't see a readonly property listed in the documentation linked below, and I don't know of a way to set html attributes to the combobox in MVC, as I've mentioned in this related post:
http://community.infragistics.com/forums/t/68963.aspx
ComboBox documentaion: http://help.infragistics.com/jQuery/2011.2/ui.igcombo
I could just set the readonly attribute in Jquery, but I'd rather do this on the server if possible.
how can i set readonly for combo when it rendered by jquery?
Perfect, thanks!
Hi JoshNoe,
Have you tried mode option?
<%
= Html
.Infragistics()
.Combo()
.Mode(ComboMode.ReadOnly)
//Other Options
.Render()
%>
That's if you initialize it in your view.
If you wish to set it into the model when you create it into the Cotroller, use the following:
ComboModel
comboViewModel = new ComboModel();
comboViewModel.Mode =
ComboMode.ReadOnly;
Hope that helps.
Thanks,