This is a migrated thread and some comments may be shown as answers.

Set OptionLabel to an Object

5 Answers 1287 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 20 Nov 2013, 12:24 AM
Using the ASP.NET MVC Wrapper, how do I specify an object for the OptionLabel (as opposed to just a simple string)?

5 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 21 Nov 2013, 02:16 PM
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!
0
Luc
Top achievements
Rank 1
answered on 27 Nov 2013, 01:49 PM
Q3 service pack?
0
Georgi Krustev
Telerik team
answered on 28 Nov 2013, 02:43 PM
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!
0
Carl
Top achievements
Rank 1
answered on 26 Dec 2013, 09:15 PM
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
0
Dimo
Telerik team
answered on 27 Dec 2013, 01:18 PM
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!
Tags
DropDownList
Asked by
Chris
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Luc
Top achievements
Rank 1
Carl
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or