Hi,
colums.Bound(o => o.Order1).ClientTemplate( "
I want to check some condition inside the client template. I am displaying certain model properties in ordered list some properties might be null.
I want to check if it is empty i should not display the template.
colums.Bound(o => o.Order1).ClientTemplate( "
- <#= Order1 #> " + "
- <#= Order2 #> " + "
- <#= Order3 #>
Here is a sample of a client template which is using conditions:
ClientTemplate("<# if (OrderID > 10) { #> <#= OrderID #> <# } else { #> <#= OrderID #> <# } #>");
<# is the client-side equivalent equivalent of <% where <#= is the client-side equivalent of <%=.
ClientTemplate("<# if (OrderID > 10) { #> <#= OrderID #> <# } else { #> <#= OrderID #> <# } #>");
<# is the client-side equivalent equivalent of <% where <#= is the client-side equivalent of <%=.