I am using Ext.grid.GridPanel in Extjs 4.
Ext.grid.GridPanel
Autoscrolling does not work in my GridPanel .
GridPanel
How can I solve this?
Put the config below in your parent GridPanel container.
layout: 'fit'
And remove autoScroll from the GridPanel .
autoScroll
scroll: true, viewConfig: { style: { overflow: 'auto', overflowX: 'hidden' } },
Try the above configuration option. This will also solve your problem.
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 ."