【发布时间】:2015-08-28 03:23:49
【问题描述】:
我是 ExtJS 的新手。我在 ExtJS 中有一个组合框,我想加载商店的第一条记录作为组合框的默认值。这是我的代码
var cutoff = store_dynamic('nr/getCutOffDate', true);
var combo_value = //here i want to store the default value taken in the store
xtype: 'combobox',
margin: '0 10 0 0',
labelWidth: 80,
width: 240,
store: cutoff,
displayField: 'date',
valueField: 'dt_val',
fieldLabel: 'Cut-Off Date',
editable: false,
id: 'cutoffdate',
value: combo_value
这是商店中的数据
{"success":true,"metaData":{"fields":["date","dt_val"]},"data [{"date":"June 30, 2015","dt_val":"6\
/30\/2015"},{"date":"June 15, 2015","dt_val":"6\/15\/2015"}]}
dt_val 是组合框中显示的内容。
【问题讨论】:
标签: javascript extjs combobox extjs4