Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExtJS - ComboBox width in EditorGridPanel

I have set up an EditorGridPanel with ComboBox's and it's working well. The only issue I'm having is that the width of the ComboBox seems to only expand to the width of the grid column, and not the content of the ComboBox itself.

Is there a way around this?

Here's an example of what I mean:

ComboBox in EditorGridPanel

Thanks!

like image 474
dmackerman Avatar asked Jun 14 '11 20:06

dmackerman


2 Answers

Use the

listWidth : Number

config option

You could calculate the length of the largest content element and then set the listWidth in the 'expand' event of the combo

Cheers!

like image 74
Varun Achar Avatar answered Nov 15 '22 14:11

Varun Achar


listWidth does'nt exist in extjs 4.

Add below to combobox config:

matchFieldWidth: false,
listConfig: {
    width: 200
},
like image 21
KBIIX Avatar answered Nov 15 '22 12:11

KBIIX