Extjs 4 Grid autoScroll

I am using Ext.grid.GridPanel in Extjs 4.

Autoscrolling does not work in my GridPanel .

How can I solve this?

+9
extjs4
source share
3 answers

Put the config below in your parent GridPanel container.

  layout: 'fit' 

And remove autoScroll from the GridPanel .

+14
source share
 scroll: true, viewConfig: { style: { overflow: 'auto', overflowX: 'hidden' } }, 

Try the above configuration option. This will also solve your problem.

0
source share

If the parent container needs to use a different layout than "fit", as suggested in the previous comments, you can try this: set the height of the grid after loading the store. Moreover, instead of calculating the actual height, this can help:

 grid.setHeight('100%') 

According to the documentation, setHeight can accept a "String used to set the CSS height style ."

0
source share

All Articles