javascript - Howto fill combobox with array in ExtJS - Stack Overflow

I am struggling with a problem in ExtJS 4...I have an array like this:[ 2010, 2011,2012 ]And I would li

I am struggling with a problem in ExtJS 4...

I have an array like this:

[ 2010, 2011,2012 ]

And I would like to fill my bobox with these values. I can set the first value with bobox.setValue() but I want to set several values. This is my bobox:

var bobox = Ext.ComponentQuery.query('bobox[name=myBox]')[0];

Does someone know how I can populate the bobox with the array?

I am struggling with a problem in ExtJS 4...

I have an array like this:

[ 2010, 2011,2012 ]

And I would like to fill my bobox with these values. I can set the first value with bobox.setValue() but I want to set several values. This is my bobox:

var bobox = Ext.ComponentQuery.query('bobox[name=myBox]')[0];

Does someone know how I can populate the bobox with the array?

Share Improve this question edited Feb 1, 2014 at 18:34 BenMorel 36.7k52 gold badges206 silver badges337 bronze badges asked Oct 15, 2012 at 12:24 NicoNico 1,0811 gold badge25 silver badges39 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 4

See this

Ext.create('Ext.form.field.ComboBox', { store: ['Red', 'Yellow', 'Green', 'Brown', 'Blue', 'Pink', 'Black'] });

Ref: http://skirtlesden./articles/extjs-boboxes-part-1

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745206152a4616602.html

相关推荐

  • javascript - Howto fill combobox with array in ExtJS - Stack Overflow

    I am struggling with a problem in ExtJS 4...I have an array like this:[ 2010, 2011,2012 ]And I would li

    6小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信