ExtJs用grid嵌套多层grid时有两个问题: 1.展开后不能锁起来 2.第二层没展开的图标为“-”号,应该为“+” 10
expander=newExt.grid.RowExpander({tpl:newExt.XTemplate('<divclass="detailData">','','...
expander = new Ext.grid.RowExpander({
tpl : new Ext.XTemplate('<div class="detailData">', '',
'</div>')
});
expander.on("expand", function(expander, r, body, rowIndex) {
// 查找 grid
window.testEle = body;
if (Ext.DomQuery.select("div.x-panel-bwrap", body).length == 0) {
Ext.DomQuery.select("div.detailData")[0];
var grid = new Ext.grid.GridPanel({
store : logBlockDs,
cm : logBlockCm1,
renderTo : Ext.DomQuery.select("div.detailData", body)[0],
autoWidth : true,
plugins : [expander1],
autoHeight : true
});
}
});
expander1 = new Ext.grid.RowExpander({
tpl : new Ext.XTemplate('<div class="detailData1">', '',
'</div>')
});
expander1.on("expand", function(expander1, r, body, rowIndex) {
// 查找 grid
window.testEle = body;
if (Ext.DomQuery.select("div.x-panel-bwrap", body).length == 0) {
Ext.DomQuery.select("div.detailData1")[0];
var grid = new Ext.grid.GridPanel({
store : logBlockDs,
cm : logBlockCm1,
renderTo : Ext.DomQuery.select("div.detailData1", body)[0],
autoWidth : true,
autoHeight : true
});
}
});
问题如图所示,谢谢 展开
tpl : new Ext.XTemplate('<div class="detailData">', '',
'</div>')
});
expander.on("expand", function(expander, r, body, rowIndex) {
// 查找 grid
window.testEle = body;
if (Ext.DomQuery.select("div.x-panel-bwrap", body).length == 0) {
Ext.DomQuery.select("div.detailData")[0];
var grid = new Ext.grid.GridPanel({
store : logBlockDs,
cm : logBlockCm1,
renderTo : Ext.DomQuery.select("div.detailData", body)[0],
autoWidth : true,
plugins : [expander1],
autoHeight : true
});
}
});
expander1 = new Ext.grid.RowExpander({
tpl : new Ext.XTemplate('<div class="detailData1">', '',
'</div>')
});
expander1.on("expand", function(expander1, r, body, rowIndex) {
// 查找 grid
window.testEle = body;
if (Ext.DomQuery.select("div.x-panel-bwrap", body).length == 0) {
Ext.DomQuery.select("div.detailData1")[0];
var grid = new Ext.grid.GridPanel({
store : logBlockDs,
cm : logBlockCm1,
renderTo : Ext.DomQuery.select("div.detailData1", body)[0],
autoWidth : true,
autoHeight : true
});
}
});
问题如图所示,谢谢 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询