1
这里的简单问题:我在Ext JS应用程序中有一个扩展行的工作网格。 繁荣。扩展行内的Ext JS组件
目前我有html
元素在我的扩展行内(这只是一个大的div
),但似乎是所有扩展行都能够显示。
有无论如何渲染扩展行的内部组件?
干杯队友,upvotes等待!
这里的简单问题:我在Ext JS应用程序中有一个扩展行的工作网格。 繁荣。扩展行内的Ext JS组件
目前我有html
元素在我的扩展行内(这只是一个大的div
),但似乎是所有扩展行都能够显示。
有无论如何渲染扩展行的内部组件?
干杯队友,upvotes等待!
您可以将组件渲染到行扩展器元素中。
var grid = Ext.create('Ext.grid.Panel', {
title: 'Simpsons',
plugins: {
ptype: 'rowexpander',
rowBodyTpl : [
'<div class="row-expander-ct"></div>'
]
},
store: {
fields:['name', 'email', 'phone'],
data: [
{ 'name': 'Lisa', "email":"[email protected]", "phone":"555-111-1224" },
{ 'name': 'Bart', "email":"[email protected]", "phone":"555-222-1234" },
{ 'name': 'Homer', "email":"[email protected]", "phone":"555-222-1244" },
{ 'name': 'Marge', "email":"[email protected]", "phone":"555-222-1254" }
]
},
columns: [
{ text: 'Name', dataIndex: 'name' },
{ text: 'Email', dataIndex: 'email', flex: 1 },
{ text: 'Phone', dataIndex: 'phone' }
],
height: 300,
width: 400,
renderTo: Ext.getBody()
});
grid.store.on({
// Delay the execution of the listener because the grid view will also
// react to this event, and we want the rows to be rendered before we
// modify them...
delay: 1,
load: function() {
Ext.each(grid.el.query('.row-expander-ct'), function(ct) {
Ext.widget('textfield', {
renderTo: ct
,fieldLabel: "Label"
,width: '100%'
});
});
}
});
grid.store.load();
有人?任何人? –