Oleg
Oleg

Reputation: 1755

Set size 'gridcolumn' by content in ExtJS

I have a gridview with columns. Here example :

 {
     xtype: 'gridcolumn',
     header: '№',                   
     dataIndex: 'number'
 },                       

Is there any way to autosize column by content?

Thanks!

Upvotes: 0

Views: 204

Answers (1)

Johan Haest
Johan Haest

Reputation: 4421

Yes just use the flex property.

Example:

column1 flex: 1  column2: flex: 1

|-----Column 1-----|-----Column 2-----|

column1 flex: 2  column2: flex: 1

|--------Column 1--------|--Column 2--|

Upvotes: 1

Related Questions