Extjs匯入Excel檔案之後grid自動重新整理顯示剛插入的資料
阿新 • • 發佈:2018-11-09
1 var winUpload = new Ext.Window({ 2 title: '匯入excel檔案', 3 width: 400, 4 height:200, 5 listeners: { 6 close: function () { 7 store.load(); 8 grid.getView().refresh(); 9 } 10 },11 minWidth: 300, 12 closeAction:'hide' , 13 minHeight: 100, 14 layout: 'fit', 15 plain:true, 16 bodyStyle:'padding:5px;', 17 buttonAlign:'center', 18 items: formUpload, 19 });
Ext建立window窗體,新增監聽listeners,當窗體關閉時執行store.load();grid.getView().refresh(); 載入資料來源,重新整理grid表格。