我正在研究此ExtJS 4
應用程序,我有一部分可以管理應用程序用戶。如何在浮動窗體面板中刷新網格面板的商店?
窗體彈出窗口floating: true
。
var user_grid_form = Ext.create('Ext.form.Panel',
{
xtype : 'form-grid',
frame : true,
title : 'User Information',
floating : true,
draggable : true,
closable : true,
closeAction : 'hide',
bodyPadding : 5,
layout : 'column',
closeAction : 'destroy',
width : 532,
items :
[
user_grid,
user_textfield
],
buttons :
[
{
text : 'Save Edits',
icon : 'images/save.png',
handler : handleUpdates
},
{
text : 'Delete User',
icon : 'images/delete.png',
handler : handleDeletes
}
]
}).show();
的user_grid
是在我的窗板網格顯示usernames
現在,問題是,當我選擇一個用戶名,就像jhony
並按Delete User
我handleDeletes
通過Ajax
更新數據庫。但後來我嘗試刷新user_grid
,它不會工作。 刪除後,用戶應該從user_grid
消失這是我曾嘗試handleDeletes
裏面做:
user_store.splice(ind, 1); // I removed `jhony` from `user_store`
// which is the `store` for `user_grid`
user_grid.getView().refresh(); // Now trying to refresh and NO ERRORS NO ACTIONS
感謝您的任何線索。