0
GridPanelを1つだけ表示したいのですが、これはウィンドウ内でスイッチクリックイベントで動的に追加します。ExtJSウィンドウでGridPanelアイテムを動的に追加して表示
var event_menu = new Ext.menu.Menu({
id : "event_menu",
items : [ {
text : 'record1',
handler : function() {
win.add(item_list_panel);//dynamica add GridPanel to show server data
win.doLayout();
item_list_store.load();
}
}, {
text : 'record2',
handler : function() {
win.remove(item_list_panel);//I want to remove it inorder to show the item_list_panel2 and only show one panel.
win.add(item_list_panel2);
win.doLayout();
item_list_store.load();
}
} ]
});
このメニューは、私のウィンドウのtbarに属します。 私がレコードの勝利をクリックするとitem_list_panel
が表示され、record2
をクリックするとitem_list_panel2
が勝利に表示され、item_list_panel
が非表示になります。 I win.remove(item_list_panel)
がエラーになります場合:私はそれを行うことができますどのように
c.getPositionEl().dom is undefined
、おかげ
ありがとう、私は私の質問を解決した! – wilson
これはあなたを助け、私を助けて答えにしたら:) – neolaser
ありがとう、それはパネルとボタンのコンポーネントで私の問題のために働いています。 –