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
1845
"Readonly" property?
posted

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.

Parents
No Data
Reply
  • 3115
    Verified Answer
    Offline posted

    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,  

     

Children