在 x-kendo-template 中使用 Razor 查询
Using Razor query within x-kendo-template
我正在尝试使用条件 Razor 查询来确定是否在 kendo 模板中包含额外的行。我查询的值是模板的一部分。问题是如何在剃须刀代码中使用 kendo 模板变量?
<script type="text/x-kendo-template" id="StatusTip">
<div class="tooltipcontent">
<table>
<tr>
<td> some row </td>
<td> #= SystemStatus # </td>
</tr>.
@if (SystemStatus == 1)
{
<tr>
<td> Some row</td>
<td> some row </td>
</tr>
}
</table>
</div>
</script>
Razor 语法(如果不需要)。散列标签可用于包含脚本块。
<script type="text/x-kendo-template" id="StatusTip">
<div class="tooltipcontent">
<table>
<tr>
<td> some row </td>
<td> #= SystemStatus # </td>
</tr>.
#if (SystemStatus == 1){#
<tr>
<td> Some row</td>
<td> some row </td>
</tr>
#}#
</table>
我正在尝试使用条件 Razor 查询来确定是否在 kendo 模板中包含额外的行。我查询的值是模板的一部分。问题是如何在剃须刀代码中使用 kendo 模板变量?
<script type="text/x-kendo-template" id="StatusTip">
<div class="tooltipcontent">
<table>
<tr>
<td> some row </td>
<td> #= SystemStatus # </td>
</tr>.
@if (SystemStatus == 1)
{
<tr>
<td> Some row</td>
<td> some row </td>
</tr>
}
</table>
</div>
</script>
Razor 语法(如果不需要)。散列标签可用于包含脚本块。
<script type="text/x-kendo-template" id="StatusTip">
<div class="tooltipcontent">
<table>
<tr>
<td> some row </td>
<td> #= SystemStatus # </td>
</tr>.
#if (SystemStatus == 1){#
<tr>
<td> Some row</td>
<td> some row </td>
</tr>
#}#
</table>