This is a migrated thread and some comments may be shown as answers.

ListView with Angular and multi-select not showing

2 Answers 267 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 31 Mar 2017, 08:55 AM

Hi,

I'm using the ListView with Angular and when I set the selectable property to multiple the ListView is not showing anymore. When I set selectable back to true, it works correctly( setting it to single doesn't work either). Any ideas what the issue might be?

<div kendo-list-view
     class="productList"
     k-data-source="$ctrl.products"
     k-selectable="multiple">
    <div class="product" k-template>
        {{ dataItem.productName }}
    </div>
</div>

 

Thanks in advance,

Christian.

2 Answers, 1 is accepted

Sort by
0
Christian
Top achievements
Rank 1
answered on 31 Mar 2017, 09:35 AM

I've solved this by using k-options and setting the selectable property to multiple in the controller:

<div kendo-list-view
     class="productList"
     k-data-source="$ctrl.products"
     k-options="$ctrl.productListOptions">
    <div class="product" k-template>
        {{ dataItem.productName }}
    </div>
</div>

 

vm.productListOptions = {
    selectable: "multiple"
};

 

0
Dimiter Topalov
Telerik team
answered on 03 Apr 2017, 11:19 AM
Hello Christian,

Good job on resolving the issue. As for the initial question - you can also configure the "k-selectable" option via the markup, but when a string like "multiple" is provided as value, it should be double-quoted, as otherwise the binding will be to a scope property, called "multiple", and if such does not exist, a JavaScript error will be thrown:

http://dojo.telerik.com/icepe

Regards,
Dimiter Topalov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
ListView
Asked by
Christian
Top achievements
Rank 1
Answers by
Christian
Top achievements
Rank 1
Dimiter Topalov
Telerik team
Share this question
or