Unplanned
Last Updated: 18 Feb 2019 13:07 by Anders Mad.
Anders Mad.
Created on: 18 Feb 2019 12:30
Category: Kendo UI for jQuery
Type: Feature Request
0
Use option element attribute in the MultiSelect's templates

It would be useful if the option element attributes can be used in the MultiSelect's templates. For example:

`<select ... ><option data-color="#f00" value="red">Red Stuff</option>`

I want to use the `data-color` attribute from the option element in the MultiSelect's template.

2 comments
Anders Mad.
Posted on: 18 Feb 2019 13:07

If anyone needs this before then change kendo.data.js in the `inferSelect` method add below before `data.push(record);`

for (var ai = 0; ai < option.attributes.length; ai++) {
var attr = option.attributes[ai];
if (/^data-/.test(attr.nodeName)) {
record.dataset = record.dataset || {};
record.dataset[attr.nodeName.substring(5)] = attr.value;
}
}
ADMIN
Ivan Danchev
Posted on: 18 Feb 2019 12:33
Hello Anders,

Thank you for submitting this feature request. We will consider implementing it in a future release.

Regards,
Ivan Danchev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.