Ram Patel
Ram Patel

Reputation: 151

Extjs 4 Grid autoScroll

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

Autoscroll is not working in my GridPanel.

How can I resolve this?

Upvotes: 9

Views: 16101

Answers (3)

user1454926
user1454926

Reputation: 199

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."

Upvotes: 0

V_Dev
V_Dev

Reputation: 93

scroll: true,
  viewConfig: {
    style: {
      overflow: 'auto',
        overflowX: 'hidden'
    }
  },

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

Upvotes: 0

Kunal
Kunal

Reputation: 1024

Put below config in your parent container of GridPanel.

   layout: 'fit'

And remove autoScroll from GridPanel.

Upvotes: 14

Related Questions