extjs5 颜色选择combox
发布网友
发布时间:2022-05-03 03:36
我来回答
共1个回答
热心网友
时间:2022-07-01 21:03
var myData = [ ['2008-08-05 12:11:11',0.03], ['2008-09-06 12:07:19',1.63] ]; store.loadData(myData); var grideast = new Ext.grid.GridPanel({ store: store, }) 重新创建myData数组,再调用 store.loadData(myData);就行。
// 获取combox ID值
var securityTypeIDValue = Ext.getCmp('securityTypeCombo').getValue();
// 获取显示值
var securityTypeDisValue = Ext.getCmp('securityTypeCombo').getRawValue();
// Combox定义
/***************************Combox start*******************************/
var securityTypeRecord=[
{name : 'SAVE_VALUE',type : 'string'},
{name : 'DISPLAY_VALUE',type : 'string'}
];
var securityTypeRecordHeads = Ext.data.Record.create(securityTypeRecord);
var securityTypeDatastore = new Ext.data.Store( {
proxy:new Ext.data.HttpProxy(new Ext.data.Connection({timeout:0,url:'/customize/control/getZhengShangsecurityType'})),
reader : new Ext.data.JsonReader( {
root : 'root'
}, securityTypeRecordHeads),
remoteSort : false
});
securityTypeDatastore.load();
var securityTypeCombo = new Ext.form.ComboBox({
id:'securityTypeCombo',
width:110,
forceSelection : true,
selectOnFocus: true,
triggerAction: 'all',
mode: 'local',
store: securityTypeDatastore,
allowBlank: true,
valueField : 'SAVE_VALUE',
displayField : 'DISPLAY_VALUE',
emptyText:'---请选择---'
});
/***************************Combox end *******************************/