I am trying to use a Partial View as a Template for the listView.
are there any exapmples?
The Template gives an error.
If I try to create a Script is does not pass ITEM that is in a loop in the listview.
<script type="text/x-kendo-tmpl" id="template">
<div class="item-box">
@Html.Partial("_ProductBox", item)
</div>
</script>
@(Html.Kendo().ListView<ProductOverviewModel>(Model.Products)
.Name("listView")
.TagName("div")
.ClientTemplate(@<text><div class="item-box">
@Html.Partial("_ProductBox", item)
</div></text>))
//.ClientTemplateId("template")
.DataSource(dataSource => {
dataSource.Read(read => read.Action("HomepageProducts", "Catalog"));
dataSource.PageSize(12);
})
.Pageable()
)
are there any exapmples?
The Template gives an error.
If I try to create a Script is does not pass ITEM that is in a loop in the listview.
<script type="text/x-kendo-tmpl" id="template">
<div class="item-box">
@Html.Partial("_ProductBox", item)
</div>
</script>
@(Html.Kendo().ListView<ProductOverviewModel>(Model.Products)
.Name("listView")
.TagName("div")
.ClientTemplate(@<text><div class="item-box">
@Html.Partial("_ProductBox", item)
</div></text>))
//.ClientTemplateId("template")
.DataSource(dataSource => {
dataSource.Read(read => read.Action("HomepageProducts", "Catalog"));
dataSource.PageSize(12);
})
.Pageable()
)