加载数据我想用ExtJS的插件“RowExpander”,但是,我会加载数据时,该事件expandbody被激发。 我已经尝试此代码,但我不知道如何设置rwoBody的扩展内容:ExtJS的4.2.0 RowExpander动态
this.GridPrincipal.getView().addListener('expandbody', function (rowNode, record, expandRow, eOpts) {
Ext.Ajax.request({
url: 'getData/' + record.get('id'),
method: 'POST',
success: function (result, request) {
// retrive the data
var jsonData = Ext.util.JSON.decode(result.responseText);
//code to change the text of the RowBody
//....
},
failure: function (result, request) {
Ext.MessageBox.alert('Failed', result.responseText);
return false;
}
});
});
非常感谢你。