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

Listview within a Listview

1 Answer 195 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Brian Roth
Top achievements
Rank 1
Brian Roth asked on 30 Jun 2016, 08:24 PM

I'm trying to make a listview within my kendo listview using MVVM. I can't output the "Items" (see Dojo example) array using the # for (var i = 0 ... } # syntax because of the need for MVVM binding.

Here is a Dojo demonstrating what I'm trying to do. Am I trying to achieve something that is impossible to do with Kendo?

Thanks,

Brian

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 04 Jul 2016, 08:56 AM
Hi Brian,

Your Dojo fails due to a misspelled template name:

<script type="text/x-kendo-tmpl" id="edit-template">
    <div class="product-view k-widget">
            <dl>               
            <dt>Employee Id</dt>
            <dd>#:Id#</dd>
        </dl>
        <div data-template="edit-items-template" data-bind="source: Items"></div>
        <div class="edit-buttons">
            <a class="k-button k-update-button" href="javascript:void(0)"><span class="k-icon k-update"></span></a>
            <a class="k-button k-cancel-button" href="javascript:void(0)"><span class="k-icon k-cancel"></span></a>
        </div>
    </div>
</script>
 
<script type="text/x-kendo-tmpl" id="edit-items-template">
            <input data-role="numerictextbox"
       data-format="c"
       data-min="0"
       data-bind="value: Amount"
       style="width: 250px">
</script>


I added "items-" (text highlighted in red) to the name of the edit item template and got it working.

Here is a link to the updated version: http://dojo.telerik.com/uSUWI/4

Regards,
Alexander Valchev
Telerik
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
ListView
Asked by
Brian Roth
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or