I am using Ext.grid.GridPanel
in Extjs 4.
Autoscroll is not working in my GridPanel
.
How can I resolve this?
I am using Ext.grid.GridPanel
in Extjs 4.
Autoscroll is not working in my GridPanel
.
How can I resolve this?
Put below config in your parent container of GridPanel.
layout: 'fit'
And remove autoScroll
from GridPanel
.
layout: 'fit'
is most suited. +1 for @Convector –
Lutes scroll: true,
viewConfig: {
style: {
overflow: 'auto',
overflowX: 'hidden'
}
},
Try the above config option. This also will solve your problem.
If the parent container needs to use some other layout other than 'fit', as suggested by previous comments, you could try this: set the height of the grid once the store loads. Moreover, instead of having to calculate the actual height, this may do the trick:
grid.setHeight('100%')
According to documentation, setHeight can accept "A String used to set the CSS height style."
© 2022 - 2024 — McMap. All rights reserved.