我有一个带有 Kendo ListView 的 Kendo Grid 作为其客户端详细信息模板。这是网格:
@(Html.Kendo().Grid<ITS.BusinessModel.TaskManager.TaskItem>()
.Name("grdPackage" + Model + "sTasks")
.Columns(columns =>
{
columns.Bound(taskModel => taskModel.WorkflowInstanceId);
columns.Bound(taskModel => taskModel.WorkflowInstanceName);
columns.Bound(taskModel => taskModel.Name).ClientTemplate("<a onclick='openTasksForm(#= ID#)' > #= Name # </a>");
}
.ClientDetailTemplateId("TaskSumeriesListViewTemplate")
.AutoBind(false)
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.ServerOperation(true)
.Model(model => model.Id(Task => Task.ID))
.Read(read => read.Action("TaskItemsList_Read", "Task", new { packageGroupID = Model, packageType = (Model == -2) ? 0 : (Model == -1) ? 1 : 2 }))
)
)
这是客户端模板:
<script type="text/x-kendo-tmpl" id="TaskSumeriesListViewTemplate">
@(Html.Kendo().ListView<ITS.BusinessModel.TaskManager.WorkflowInstanceSummaryItem>("#=TaskSumaries#")
.Name("listViewPackage")
.TagName("div")
.ClientTemplateId("SummeriesTemplate")
.ToClientTemplate()
)
</script>
这是 ListView 的模板:
<script type="text/x-kendo-tmpl" id="SummeriesTemplate">
<div>
#=ColumnName# : #=ColumnValue#
</div>
</script>
Grid 读取的每个 TaskItem 都有一个 TaskSumariesList,它是一个 List。我想在 ListView 的网格客户端详细信息中使用此列表。我怎样才能做到这一点?