1

I'm trying to customize my kendo multiselect control's group header. I have checked the documentation below,

https://demos.telerik.com/kendo-ui/multiselect/grouping

no matter how I change the groupTemplat, the group always display in top right. Please check my code below,

var checkInputs = function (elements) {
    elements.each(function () {
        var element = $(this);
        var input = element.children("input");
        input.prop("checked", element.hasClass("k-state-selected"));
    });
};

function initData() {
    $scope.dataOptions = {
        dataSource: getDataSource(),
        dataTextField: "value",
        itemTemplate: "<input type='checkbox'/> #:data.value# ",
        groupedTemplate: "<input type='checkbox'/> #:data#",
        autoClose: false,
        dataBound: function () {
            var items = this.ul.find("li");
            setTimeout(function () {
                checkInputs(items);
            });
        },
        change: function () {
            var items = this.ul.find("li");
            checkInputs(items);
        }
    }
}

I want to implement the multi-select dropdown like the Location option in this website.

When I checked the group, then all of the items in this group should be selected.

Drag and Drop
  • 2,672
  • 3
  • 25
  • 37
Allen4Tech
  • 2,094
  • 3
  • 26
  • 66
  • I don't think the Kendo's MultiSelect can work like that. Also, I don't think there is any other widget around to do that(checked only selec2). It seems to be a private widget from that website. – DontVoteMeDown Feb 14 '17 at 10:32
  • 1
    doc said : 'The widget exposes the groupTemplate and fixedGroupedTemplate templates that allow the configuration of the group titles rendering.' – Drag and Drop Feb 14 '17 at 10:48

0 Answers0