Hi! I'm trying to display List of items DecimalPriceList. I have function:
<script type="text/javascript">
function iterate(object) {
debugger;
var html = '<ul>';
if (object !== null && object.length > 0) {
object.forEach(function (data) {
html += '<li>' + data + '</li>';
});
} else {
html += '<li>-</li>';
}
html += '</ul>';
return html;
}
</script>
And Grid, which displaying as ClientDetailTemplate:
<script id="SelectionsTemplate" type="text/kendo-tmpl">
@(Html.Kendo().Grid
<BetInAction.Backend.Models.FeedSelectionViewModel>
()
.Name("grid_#=MarketId#") // template expression, to be evaluated in the master context
.Columns(columns =>
{
columns.Bound(o => o.MarketId).Width(50);
columns.Bound(o => o.SelectionId).Width(110);
columns.Bound(o => o.SelectionName).Width(350);
columns.Bound(o => o.SelectionTypeId).Width(110);
columns.Bound(o => o.CreatedDate).Width(110);
columns.Bound(o => o.DecimalPriceList).ClientTemplate("#= iterate(DecimalPriceList)#");
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.Read(read => read.Action("HierarchyBinding_Selections", "FeedMapping", new { eventId = "#=EventId#", marketId = "#=MarketId#" }))
)
.Pageable()
.Sortable()
.ToClientTemplate()
)
</script>
I'm getting an error like on picture.
What should I do?