2
A
回答
1
如何在电网使用RowExpander?这里有一个例子:http://dev.sencha.com/deploy/dev/examples/grid/grid-plugins.html
7
找到尝试是这样的:
//Create the Row Expander.
var expander = new Ext.ux.grid.RowExpander({
tpl : new Ext.Template('<div id="myrow-{Id}" ></div>')
});
//Define the function to be called when the row is expanded.
function expandedRow(obj, record, body, rowIndex){
//absId parameter for the http request to get the absence details.
var absId = record.get('Id');
var dynamicStore = //the new store for the nested grid.
//Use Id to give each grid a unique identifier. The Id is used in the row expander tpl.
//and in the grid.render("ID") method.
var row = "myrow-" + record.get("Id");
var id2 = "mygrid-" + record.get("Id");
//Create the nested grid.
var gridX = new Ext.grid.GridPanel({
store: dynamicStore,
stripeRows: true,
columns: [
//columns
],
height: 120,
id: id2
});
//Render the grid to the row expander template(tpl).
gridX.render(row);
gridX.getEl().swallowEvent([ 'mouseover', 'mousedown', 'click', 'dblclick' ]);
}
//Add an expand listener to the Row Expander.
expander.on('expand', expandedRow);
你可以找到关于此Here
1
更多信息,这是可能做到这一点正如其他人所提到的那样,但是我建议不要这样做。
原因: 由于子网格没有被正确销毁而导致内存泄漏。 选择模型无法正常工作 事件变得混乱。
+0
你能提供更多的洞察这些内存泄漏? – 2011-10-06 13:31:19
+0
发生内存泄漏,因为网格在网格刷新时被破坏,但附加的事件处理程序等仍然存在于JS中。 – eli 2011-11-09 02:34:20
相关问题
- 1. 用extjs 4嵌套网格
- 2. extjs嵌套json
- 3. Extjs 4中的嵌套网格
- 4. extJS:读取嵌套的JSON
- 5. ExtJS的嵌套JSON店轨
- 6. ExtJS的和嵌套模型
- 7. ExtJS的3.4:在电网
- 8. 拖动和电网和EXTJS
- 9. ExtJS 4网格:显示与关联的嵌套数据模型
- 10. 如何在EXTJS 4网格中显示嵌套的Json数据?
- 11. 使用行扩展器在ExtJS 4.1中嵌套网格
- 12. EXTJS 4 Json在网格面板中嵌套数据
- 13. 从嵌套json加载并保存到extjs中的网格
- 14. link_to嵌套的网址不嵌套
- 15. extjs:请求中的嵌套baseParams
- 16. 解析ExtJS中的嵌套Json 4
- 17. ExtJS的4.1 - 嵌套hasOne在JSON
- 18. 嵌套网站集
- 19. Asp.Net嵌套网站
- 20. Bootstrap嵌套网格
- 21. 如何设置样式电网ExtJS的
- 22. ExtJS的3(电网滤波器)
- 23. ExtJS的电网演技很奇怪
- 24. 将数据加载到ExtJS的电网
- 25. ExtJS的Ext.Msg导致电网使用ExtJS的3.0
- 26. telerik嵌套网格问题
- 27. 如何嵌套ASP.NET网站
- 28. 嵌套的Flexbox网格
- 29. CSS - 在网格中嵌套网格
- 30. Elasticsearch。嵌套查询嵌套在嵌套
这是一个具体的例子:http://www.programering.com/a/MDN4cTMwATY.html – MacGyver 2014-08-07 19:23:53