【发布时间】:2018-02-03 08:57:36
【问题描述】:
我正在使用 Kendo 分层网格在我的父(主)网格中显示类别,并将产品显示为子行(详细网格)。
这是我的DEMO。
我正在使用自定义模板来添加/编辑我的产品。
在弹出的表单中,我想在 Product 表单字段上方的标签中显示父类别名称及其一些详细信息。
现在在每个产品添加或编辑中,我想在表单中显示父类别的详细信息,并且还想通过产品创建/更新请求动态提交父类别 ID
在我下面的 JS 代码中,我可以使用下面的代码访问当前的详细信息网格包装器,但不知道如何访问parent row model 详细信息
.....
.......
function detailInit(e) {
$("<div/>").appendTo(e.detailCell).kendoGrid({
....
......
//ON CLICK ADD/EDIT BUTTON FOR CHILD ROWS
edit: function(e) {
var detailGridWrapper = this.wrapper;
//Want to get Parent Category model
//Retrieve some attributes out of the Category model, so that I can display them in the popup Add / Edit Product form
........
.....
【问题讨论】:
标签: javascript jquery kendo-ui kendo-grid kendo-template