标签:count() opera trap component author param success begin ext
var griddb = Ext.ComponentQuery.query("Ali_DeliveryAuthorityList");
griddb = griddb[griddb.length - 1];
var store = Ext.getStore("DeliveryAuthorityStore");
store.proxy.extraParams = obj;
store.loadPage(1
, {
scope: this,
callback: function (records, operation, success) {
//有两种办法
//第一种
var grid = griddb;
var columns = grid.columns;
for (var i = 0; i < columns.length; i++) {
var column = columns[i];
grid.getView().autoSizeColumn(column);
column.setWidth(column.getWidth() + 5);
};
////--第二种Begin-自动适应列宽
var upList = griddb;
for (var i = 1; i < upList.headerCt.getColumnCount() ; i++) {
upList.headerCt.getGridColumns()[i].autoSize(i);
upList.headerCt.getGridColumns()[i].setWidth(upList.headerCt.getGridColumns()[i].getWidth() + 5);
};
////--End-自动适应列宽
loadMarsk.hide();
}
}
);
Extjs Ext.grid.column.Column 自适应内容
标签:count() opera trap component author param success begin ext
原文地址:http://www.cnblogs.com/hqyj/p/7088445.html