我想在使用rowexpander插件展开该行时在网格行内创建网格。如何在expandbody事件上渲染子网格?ExtJS4 - 呈现子网格
这是到目前为止我的代码,它被用来作为一个事件处理财产时,我定义我的网格面板:
getOtherProducts: function (rowNode, record, expandRow, eOpts) {
$.ajax({
type: 'GET',
url: "Report.aspx/GetOtherProducts",
data: { ID: record.data['ID'] },
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function() {
var subStore = Ext.create('pr.store.Store-Products');
subStore.proxy.extraParams.productID = record.data['ID'];
var subGrid = Ext.create('Ext.grid.Panel', {
store: subStore
});
subGrid.getEl().swallowEvent(['mouseover', 'mousedown', 'click', 'dblclick']);
},
error: function() {
showNotificationBar("Error retrieving product data. Re-expand the row to try again.");
}
});
},
您使用的是哪个版本? – Eric 2012-03-06 18:23:01
您可能需要扩展rowexpander插件。我做了类似的事情,但使用roweditor插件,[像这样](http://stackoverflow.com/questions/8812147/extjs-extend-grid-roweditor-plugin-to-edit-array)。 – Geronimo 2012-03-06 19:02:49