最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Ext中下拉列表ComboBox組件store數(shù)據(jù)格式用法介紹

 更新時(shí)間:2013年07月15日 16:54:41   作者:  
本文為大家詳細(xì)介紹下Ext中下拉列表ComboBox組件store數(shù)據(jù)格式的基本用法,感興趣的朋友可以參考下哈,希望對(duì)大家有所幫助
復(fù)制代碼 代碼如下:

var p_years = new Ext.form.ComboBox( {
fieldLabel : '統(tǒng)計(jì)年份',
anchor : anchor_w,
mode : 'remote',
maxHeight:100,
triggerAction : 'all',
selectOnFocus : true,
forceSelection : true,
editable : false,
//store :[['11', '2011'], ['12', '2012'],['13', '2013']] //此為第一種
store:[2011,2012,2013,2014,2015,2016,2017,2018] //此為第二種,當(dāng)沒(méi)有制定value和text的時(shí)候,默認(rèn)提交值與顯示值為同一個(gè)。
});

在該組件中,可以直接手寫(xiě)數(shù)組格式[ [' value','Text ' ] ,[ ],[ ] ]進(jìn)行構(gòu)建,提交值是前者,后者作為顯示值。
下面是比較正規(guī)用法,從數(shù)據(jù)庫(kù)同步數(shù)據(jù)字典渲染comboBox組件
復(fù)制代碼 代碼如下:

var proj_main_store = new Ext.data.JsonStore({
url : "************",
fields : ['TEXT', 'VALUE'],
root : "objs",
baseParams : {
"obj/dicttypeid" : "BM_IMPORTANT_PROJ"
}
});
proj_main_store.addListener("load", function(){
proj_main_store.insert(0, new Ext.data.Record({
'TEXT' : '全部',
'VALUE' : ""
}));
});
var proj_main_type = new Ext.form.ComboBox( {
fieldLabel : '重點(diǎn)工程',
anchor : anchor_w,
mode : 'remote',
triggerAction : 'all',
selectOnFocus : true,
forceSelection : true,
editable : false,
valueField : 'VALUE',
displayField : 'TEXT',
store : proj_main_store
});

相關(guān)文章

最新評(píng)論

土默特左旗| 永济市| 寿宁县| 天祝| 禹城市| 呼图壁县| 聂拉木县| 抚顺市| 宝坻区| 宁河县| 鹤壁市| 稷山县| 太白县| 普洱| 绥德县| 丹东市| 西安市| 佳木斯市| 佛山市| 阳江市| 浙江省| 罗城| 沈丘县| 德安县| 徐汇区| 长丰县| 若羌县| 新龙县| 余庆县| 清水河县| 南江县| 嘉禾县| 肇州县| 鸡西市| 江永县| 收藏| 饶阳县| 汉寿县| 阳泉市| 昆山市| 宜君县|