ListView with Angular and multi-select not showing

3 posts, 0 answers
  1. Christian
    Christian avatar
    15 posts
    Member since:
    May 2009

    Posted 31 Mar Link to this post

    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. Christian
    Christian avatar
    15 posts
    Member since:
    May 2009

    Posted 31 Mar in reply to Christian Link to this post

    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"
    };

     

  3. Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    628 posts

    Posted 03 Apr Link to this post

    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.
Back to Top