ZippyZippedUp
ZippyZippedUp

Reputation: 456

Kendo UI for Vue - TreeView: How to check child checkboxes?

I'm currently using Telerik's Vue wrappers for Kendo UI. For the TreeView control, the jQuery version and MVC wrappers allow a property to be set to automatically check child checkboxes upon checking the parent e.g.

    $("#treeview").kendoTreeView({
        checkboxes: {
            checkChildren: true
        },

I can get the checkboxes displaying but I'm struggling to set this 'check children' option with the Vue wrappers. Is there a way to do this in the Vue wrappers?

I've tried using the same syntax as the jQuery and MVC wrapper versions without success as shown below. I'd prefer not to have to resort to jQuery to do this if there is a built-in option.

<kendo-treeview :data-source="complexLocalDataSource" :checkboxes="true" :check-children="true"
                :data-text-field="['category.categoryName', 'subCategoryName']">
</kendo-treeview>

Upvotes: 0

Views: 648

Answers (1)

ZippyZippedUp
ZippyZippedUp

Reputation: 456

I finally worked this one out by looking at the source code for the Vue wrappers. In the html, you can add :checkboxes="checkChildren".

This is a property in the Vue model, which returns: checkChildren: { checkChildren: true }

Upvotes: 1

Related Questions