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

optgroup from html source, not datasource

1 Answer 93 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Bridge24
Top achievements
Rank 1
Iron
Bridge24 asked on 04 Jun 2015, 07:40 PM

Hi, I tried the new optgroup feature that way, and it is not working:

http://dojo.telerik.com/uZaSE/3

The optgroup is rendered as an "undefined" block.

According to that blog post, you supports dropdownlist option group.

But... for now, we are unable to sort them in "our" order, that is not alphabetical, from data source.

Also, we are unable to load them directly from the "html source" (select / optgroup / option)... 

To be clear, we have 3 groups, and the name of these groups have nothing to do with alphabetical order.  Also, our customer can change its UI Language, so that text can change when our user change its ui language.  But, the logical order or the groups must stay the same, even if they are displayed in french, english, spanish, ... 

Do you have plans to supports the option groups directly from the "<select>" source?  

Or to "correctly" allow us to load them from data source, by providing a third "field" that allow us to manage order, independent of the displayted text?

Thank you.

1 Answer, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 05 Jun 2015, 11:45 AM
Hello,

The support for a grouped data source has been added since Q1 2015, but the data inferring from a grouped SELECT element was added later (logged issue). That being said, the next internal build / next official release will include that functionality.

The inferring process basically means that we generate an object with 3rd field that represent the optgroup label value. As the grouping is based on sorting, the grouped DropDownList will be either "asc" or "desc" sorted. It will not be able to persist the custom optgroup order.

If you would like/need to keep the custom optgroup order, then you will need to infer the data manually and then group the data manually (the serverGrouping option allows to define the groups manually).

Regards,
Georgi Krustev
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
Bridge24
Top achievements
Rank 1
Iron
Answers by
Georgi Krustev
Telerik team
Share this question
or