0
창에서 스위치 클릭 이벤트로 동적으로 추가하는 GridPanel 하나만 표시하려고합니다.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
고마워, 그것은 버튼 구성 요소뿐만 아니라 패널과 관련된 문제로도 효과가있다. –