概述: RadioGroup內含多個Radio,每個Radio.name必須相同,選中事件RadioGroup不提供,Radio子組件自行處理
功能: 選擇一個Radio,動態加載GridPanel.

new Ext.form.RadioGroup({
//fieldLabel : "資料選擇", //RadioGroup.fieldLabel 標簽與 Radio.boxLabel 標簽區別
hideLabel : true, //隱藏RadioGroup標簽
items : [
new ({ //三個必須項
checked : true, //設置當前為選中狀態,僅且一個為選中.
boxLabel : "書籍借閱", //Radio標簽
name : "borrow", //用于form提交時傳送的參數名
inputValue : "book", //提交時傳送的參數值
listeners : {
check : function(checkbox, checked) { //選中時,調用的事件
if (checked) {
borrow_grid.reconfigure(book_store,book_cm); //動態重新加載GridPanel
book_store.load();
}
}
}
}),
new Ext.form.Radio({ //以上相同
boxLabel : "期刊借閱",
name : "borrow",
inputValue : "magazine",
listeners : {
check : function(checkbox, checked) {
if (checked) {
borrow_grid.reconfigure(magazine_store,magazine_cm);
magazine_store.load()
}
}
}
}), new Ext.form.Radio({
boxLabel : "標準借閱",
name : "borrow",
inputValue : "standard",
listeners : {
check : function(checkbox, checked) {
if (checked) {
borrow_grid.reconfigure(
standard_store,
standard_cm);
standard_store.load();
}
}
}
})]
})
posted on 2009-04-01 09:31
紫蝶∏飛揚↗ 閱讀(17143)
評論(0) 編輯 收藏 所屬分類:
EXTJS