我正在使用ext.net1创建多级行扩展器。
给出example,
// add expander for all levels except last (last level is 5)
if (level < 5)
{
view.Listeners.BeforeRefresh.Fn = "clean";
var re = new RowExpander
{
ID = newGridId + "_RE",
EnableCaching = true,
Template = { ID = newGridId + "_TPL", Html = "<div id=\"row_{ID}\" style=\"background-color:white;\"></div>" }
};
re.Listeners.BeforeExpand.Fn = "loadLevel";
grid.Plugins.Add(re);
}
类似地,我只想在record.parentId === -1
时调用rowexpander,但我不知道如何从后面的代码中调用数据。
我的代码
var re = new RowExpander
{
ID = "RulesRowExpander",
Width = 50,
Listeners =
{
Expand =
{
Handler = "#{" + ID + "}.rowExpanderOnExpandListener(record.id);"
},
BeforeExpand =
{
Handler = "#{" + ID + "}.rowExpanderBeforeExpandHandler(this);"
}
},
};
Plugins.Add(re);
有人可以指导我吗?谢谢。