PDA

View Full Version : Panel Scrolling issue



nak1
15 Jul 2010, 7:50 AM
Guys,

I recently ran into a problem where my panel wasn't scrolling after a child item, an Ext.DataView object, loaded it's data. I have the panel set to autoScroll: true, and the height properly set as well.

I then tinkered with Firebug a bit and noticed that on line 2334 of ext-all.css there was this attribute being set:
.x-grid-panel .x-panel-body {
overflow:hidden !important;
}

When I removed it the scrolling worked. I'm using Ext 3.0.0, is this a bug?

Animal
15 Jul 2010, 7:51 AM
You have rendered a DataView into a GridPanel's body?

nak1
15 Jul 2010, 8:33 AM
Right, I've used the "add" method to add this as an item to the Ext.GrtidPanel.

Animal
15 Jul 2010, 9:16 AM
You cannot do that.

That's why the @hide annotation was introduced into the documentation comments.

You will notice that GridPanel's API docs do not have an add method.

nak1
15 Jul 2010, 10:10 AM
Sorry, that's a standard Ext.Panel, not a GridPanel, which I used the add() method

Animal
15 Jul 2010, 10:13 AM
So why would it have a class of x-grid-panel, and its body have a class of x-grid-panel-body?

nak1
15 Jul 2010, 2:28 PM
Well It just had the .x-panel-body class associated to it. When it pulled the style class definition up in Firebug, it was defined like this
.x-grid-panel .x-panel-body {
overflow:hidden !important;
}

Animal
15 Jul 2010, 9:16 PM
Only if SOMEWHERE, you have illegally inserted a Component into a GridPanel.

That CSS selector only applies to Panel bodies which are INSIDE A GridPanel.

nak1
16 Jul 2010, 5:03 AM
Actually that panel is within a FormPanel, which is in a GridPanel. Is there anyway to override that style class from being added?

Animal
16 Jul 2010, 5:18 AM
Actually that panel is within a FormPanel, which is in a GridPanel

As I already told you.

You cannot put ANYTHING inside a GridPanel.

That is your problem

nak1
16 Aug 2010, 7:44 AM
So instead of placing an Ext.Panel object there, do you have any thoughts/suggestions? Perhaps just a div?