Add support for custom data-* attributes on the <option> tag in kendoDropDownList
Currently the data-* attributes on the <option> tags are removed by the kendoDropDownList widget.
Please pass them through so they can be used.
After searching the kendo.all.js I found that there is currently no way the custom data-* can be added into the generated html code.
I'm using MVVM for a rather large SPA. Some parts of the SPA is generated on the server (webservice) which is just a partial html. Which looks like (simplest one):
<select data-role="dropdownlist" name="ProductTypeID" class="k-textbox">
<option value="9" data-cond="DependsValue(ProductTypeCategoryID,1)">Compliments cards</option>
<option value="1" data-cond="DependsValue(ProductTypeCategoryID,1)">Flyers</option>
<option value="3" data-cond="DependsValue(ProductTypeCategoryID,3)">Brochures</option>
<option value="25" data-cond="DependsValue(ProductTypeCategoryID,6)">Roll-up banners</option>
I was trying to convert this into a datasource which can be bound to the dropdownlist, but this has several drawbacks. The most important are:
- There are almost 60 different of these kind of dropdowns that can be generated from the server; This means a lot of extra code and webservices.
- The data-* attributes should be supported accordingly the html5 standard to my humble opinion :)
I found two questions regarding this, but both where unanswered.
I add them here for you comfort :)