Set OptionLabel to an Object

6 posts, 0 answers
  1. Chris
    Chris avatar
    5 posts
    Member since:
    Aug 2012

    Posted 19 Nov 2013 Link to this post

    Using the ASP.NET MVC Wrapper, how do I specify an object for the OptionLabel (as opposed to just a simple string)?
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 21 Nov 2013 Link to this post

    Hello Chris,


    Currently, this MVC wrapper supports only string option label value. If you need to define an object for the optionLabel option, then you will need to initialize DropDownList widget using JavaScript. I will log your request in our product backlog. We'll have implemented this functionality by the next official release of Kendo UI.


    Regards,
    Georgi Krustev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Luc
    Luc avatar
    12 posts
    Member since:
    Dec 2007

    Posted 27 Nov 2013 Link to this post

    Q3 service pack?
  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 28 Nov 2013 Link to this post

    Hello Luc,

    The feature was implemented and it will be available in the next internal build of Kendo UI.

    Regards,
    Georgi Krustev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Carl
    Carl avatar
    8 posts
    Member since:
    Nov 2013

    Posted 26 Dec 2013 Link to this post

    Hello Georgi,

    Is this feature available in the latest release? (ASP.NET MVC 2013.3 1119 Version) I am also looking to implement the same functionality as the OP. I could not find any documentation on the Kendo website on how this works with the MVC Wrappers.

    Thanks,

    Carl
  7. Dimo
    Admin
    Dimo avatar
    8331 posts

    Posted 27 Dec 2013 Link to this post

    Hi Carl,

    Georgi announced the newly implemented enhancement on November 28. The current official Kendo UI version is 2013.3.1119.

    http://docs.kendoui.com/api/framework/kendo#fields-version

    You can try the latest internal build or wait for the Q3 SP1 release, which is due in mid January. The OptionLabel will support for example...

    Html.Kendo().DropDownList()
       .OptionLabel(new {
          Text = "my label",
          Value = 0
    })

    In case you choose to check out an internal build, please note that we have identified a limitation of the OptionLabel when AutoBind() is set to false - it does not initially appear. This will be resolved for  the SP1 release.

    Regards,
    Dimo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
UI for ASP.NET MVC is VS 2017 Ready