Hello,
I'm trying to display a list of checkbox items inside of a list view ONLY if the boolean isSelected field is false.
Here is how I call the listview:
@(Html.Kendo().ListView<TestMultiSelect.ViewModels.TestVM>(Model)
.Name("listView")
.TagName("div")
.ClientTemplateId("template")
.DataSource(dataSource => dataSource
.PageSize(20)
.ServerOperation(false)
)
)
My TestView model:
public class TestVM
{
public int ID { get; set; }
public string Name { get; set; }
public bool IsSelected { get; set; }
}
..and here is my Client template:
<script type="text/x-kendo-tmpl" id="template">
<div class="product">
# var isSelected = @#:IsSelected#;
if (isSelected !== true) { # @(Html.Kendo().CheckBox().Name("#:ID#").Label("#:Name#")) # } #
</div>
</script>
I get a failure in the client template.
Any suggestions are appreciated.
Thanks in advance,
Dave
I'm trying to display a list of checkbox items inside of a list view ONLY if the boolean isSelected field is false.
Here is how I call the listview:
@(Html.Kendo().ListView<TestMultiSelect.ViewModels.TestVM>(Model)
.Name("listView")
.TagName("div")
.ClientTemplateId("template")
.DataSource(dataSource => dataSource
.PageSize(20)
.ServerOperation(false)
)
)
My TestView model:
public class TestVM
{
public int ID { get; set; }
public string Name { get; set; }
public bool IsSelected { get; set; }
}
..and here is my Client template:
<script type="text/x-kendo-tmpl" id="template">
<div class="product">
# var isSelected = @#:IsSelected#;
if (isSelected !== true) { # @(Html.Kendo().CheckBox().Name("#:ID#").Label("#:Name#")) # } #
</div>
</script>
I get a failure in the client template.
Any suggestions are appreciated.
Thanks in advance,
Dave