ExtJS Combobox 如何设置默认和取值问题
来源:互联网 发布:android app源码下载 编辑:程序博客网 时间:2024/06/05 23:05
学习ExtJs,如何给combobox选中某一行, 取值问题。
following is for stores combobox
var readerLocation = new Ext.data.WCFJsonReader({
root: 'data', id: 'Store', totalProperty: 'totalCount',
fields: [
{ name: 'Store', type: 'int' },
{ name: 'StoreName', type: 'string' }
/*0:'All', '1':'ShangHai', '2':'BeiJing' */
]
});
var storeStore = new Ext.data.Store({
proxy: new Ext.data.WCFHttpProxy({
url: '/*.svc/GetStoresList'
}),
reader: readerLocation,
remoteSort: true,
listeners: {
load: function() {
comboLocation.setValue(comboLocation.getValue());
}
}
});
var comboLocation = new Ext.form.ComboBox({
store: storeStore,
displayField: 'StoreName',
valueField: 'Store',
id: 'comboboxStore',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
selectOnFocus: true,
value: '',
width: 180,
applyTo: 'ddlStore'
});
storeStore.load();
storeStore.on("load", onstoreStoreLoad, storeStore, true);
function onstoreStoreLoad() {
if (storeStore.getTotalCount() > 0)
comboLocation.setValue(storeStore.getAt(0).data.Store);
}
/*** above is for location ***/
点击按钮 取值like:
Ext.get("btnFilter").on("click", displayGrid);
function displayGrid() {
var storeFilter = comboLocation.getValue();
});
- ExtJS Combobox 如何设置默认和取值问题
- ExtJS Combobox 如何设置默认和取值问题
- ExtJS Combobox 如何设置默认和取值问题
- ExtJS Combobox 如何设置默认和取值问题
- EXTJS如何设置ComboBox的值
- ExtJs的ComboBox赋值与取值
- combobox如何设置默认选择项?
- easyui combobox 赋值,取值,默认选中。
- Extjs FormPanel.getForm().getValues()对下拉框(Combobox)取值的问题
- Extjs中的ComboBox在加载时默认选中值的问题的解决办法。
- Extjs EditorGridPanel中ComboBox列的显示问题(默认显示键而不是值)
- ComboBox的取值问题
- easyui-combobox 取值问题
- easyui-combobox 取值问题
- EXTJS /取ComboBox里的文本displayField值和实际valueField值
- EXTJS /取ComboBox里的文本displayField值和实际valueField值
- EXTJS /取ComboBox里的文本displayField值和实际valueField值
- Extjs Combobox 高度设置
- javascript跨域问题
- 线段树总结
- IsDebuggerPresent() 函数检测进程是否运行在调试器的控制下
- 读取远程图片到服务器修正版
- solaris 的ZFS操作
- ExtJS Combobox 如何设置默认和取值问题
- 汇编入门学习----第一天(2)【原创】
- 一个同步控的工作记录——随时随地地同步
- OA-WorkFlow-FSM
- 辛卯兔年第一博
- VerifyError: Error #1107: ABC 数据已损坏,尝试的读取操作超出范围。
- iphone开发入门笔记
- xpath笔记
- fileinput: inplace