Pending Review
Last Updated: 27 Sep 2022 11:08 by Athanasios
Created by: Athanasios
Comments: 0
Category: Kendo UI for jQuery
Type: Bug Report

There are several problems when extending a widget .
In this example we have extended the DropDownTree.

  1. Some properties like fillMode, no matter if we set in in the options or in the extended widget it self (kendoDemoDropDownTree)
    sets the value but never actually applies. Also the dataSource must be in the following format 

selectedProductId: [{ id: "a" }, { id: "c" }],

and  not

selectedProductId: ["b", "c"]

So some properties are supported and other that have been added later not.


I present you the source code (

<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">

    <script src=""></script>
    <script src=""></script>
    <script src=""></script>
    <script src=""></script>
    <link rel="stylesheet" href="">

<input id="dropdowntreeExt" data-bind="value: selectedProductId">
    (function ($) {
        var kendo = window.kendo,
            ui = kendo.ui,
            DropDownTree = ui.DropDownTree;

        var DemoDropDownTree = DropDownTree.extend({
            init: function (element, options) {
      , element, options);

                $(element).parent().addClass("k-picker-solid k-picker k-rounded");

            options: {
                name: "DemoDropDownTree",
                checkboxes: true,
                fillMode: "flat"

    var viewModel = kendo.observable({
        selectedProductId: [{ id: "a" }, { id: "c" }],
        //selectedProductId: ["b", "c"],
        products: [
            { id: "a", name: "Coffee" },
            { id: "b", name: "Tea" },
            { id: "c", name: "Juice" }

    kendo.bind($("#dropdowntreeExt"), viewModel);

        valuePrimitive: true,
        dataTextField: "name",
        dataValueField: "id",
        //checkboxes: true,
        dataSource: viewModel.products//,
        //fillMode: "flat"


(!) This also applies in the latest versions as well (2022R2 and 2022R3).

2. if you place the properties in kendoDropDownTree, everything works well and the datasource also accepts the format selectedProductId: ["b", "c"]

3. Many options, like autoWidth property, don't apply in extended widgets (i.e.  MultiSelect, DropDownList, DropDownTree etc).

4, In DropDownTree for the extended widget, valuePrimitive: true is not applicable. Instead of returning an array of the selected keys, it returns an array of the entire item.


Pending Review
Last Updated: 09 Sep 2022 06:29 by ADMIN

Add a hidden input to store the current value in it at all times, and a visible display input that has the month/day/year or current value displayed in it; it solved all of the issues and is currently implemented on numerous other Kendo form input controls.

This will make the DateInput compatible with JQuery Unobtrusive Validation.