Disable Option Label

3 posts, 0 answers
  1. Phani
    Phani avatar
    2 posts
    Member since:
    Oct 2016

    Posted 02 Nov Link to this post

    Hi There,

    I am newbie to Kendo. I am having issue with DropdownlistFor while binding to Viewbag selectlist. In the below code  ViewBag.AddressList has a disabled value and it is not binding as disabled item in dropdownlist.

    Please see below Code

     ViewBag.AddressList = new SelectList(model, "CodeOrder", "CodeDisplay",

                                             selectedValue: model[0].CodeOrder.ToString(),

                                              disabledValues: model[0].CodeOrder.ToString());

    @Html.Kendo().DropDownListFor(m => m.AddressType)

                            .BindTo((SelectList)ViewBag.AddressList)

                           .HtmlAttributes(new {  @id = "ddlAddressType" })

     

    In the attached image , Address Type is considered as option label and has to be disabled as well as not allowing user to select it.

    Best Regards,

    Phani

  2. Anton
    Admin
    Anton avatar
    58 posts

    Posted 03 Nov Link to this post

    Hello Phani,

    Currently, Kendo UI DropDownList widget does not support disabling items. However you could try the workarounds mentioned in this forum thread.

    I noticed that you have opened a support ticket for the same issue. I would suggest to continue any further conversation there.

    Regards,
    Anton
    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Phani
    Phani avatar
    2 posts
    Member since:
    Oct 2016

    Posted 03 Nov Link to this post

    Hello Anton,

    Thanks I did fix it now with the workarounds mentioned in the thread.

    Best Regards,

    Phani K

     

Back to Top