0
votes

I want to autosize the grid columns to max size of the content. How do i do this. i see only autoSize function on grid column, not sure how to use it.Say column header width is more then the column data width, that should be used.

I have used autosize function, It works, but i have few issues, I have to define the align property i.e text fields will be left and number fields will be on right, then heading text gets cut. I have locked columns in all reports, locked section gives some empty spaces.

https://fiddle.sencha.com/#fiddle/1cr6

  1. See column selling code. Its not showing full because of align: Right property. If you remove it will work. 2.After DOW column empty space is coming.
  2. Without minWidth Property columns wont scale properly.
1

1 Answers

1
votes

Take a look at this piece of documentation: Ext.grid.column.Column - Setting sizes. I don't think you can make columns scale to content. You can, however, set fixed sizes or make them flex.

I hope this helps.