Last Updated: 11 Feb 2021 15:17 by ADMIN
Created on: 11 Feb 2021 15:14
Category: MVVM
Type: Feature Request
Improve the data-template attributes to support inline templates in MVVM scenario

I am using DropDownList in MVVM scenario. Currently, the MVVM supports only external templates. If I try to use the inline template with a simple string in no-data-template it is rendered as expected. However, if there is a special symbol in the template a JavaScript error will be thrown. For example, the following noDataTemplate is throwing an error:

data-no-data-template="some text ."

I would like to have the possibility to use inline templates with special symbols in MVVM scenarios.


I would suggest using a Regex in the parseOptions function in kendo.all.js as demonstrated below:

if (typeof value === 'string') {
    var rxIDtest = /^[A-Za-z0-9.:_]/g
    if (rxIDtest.test(value) === false && $('#' + value).length) {
        value = kendo.template($('#' + value).html());
    } else if (source) {
        value = kendo.template(source[value]);
} else {
    value = element.getAttribute(option);