PDA

View Full Version : Grid sizing issues



markmacumber
2 Jul 2009, 5:34 PM
Hi All,

I know that there is a common theme in the forums in regards to grid sizing, but Im really having difficulty with the com.extjs.gxt.ui.client.widget.grid.Grid control in Gxt 2.0 RC2 (which I downloaded yesterday).

I should mention that I actually have been having these issues in 1.2.4 as well, but Im sick of trying to fix the renderings of the grid without help.

At the moment, Ive got a grid within a ContentPanel, very similar to the examples on the Gxt explorer demo. But the content panel is within a collapsed FormPanel.

like so:


FormPanel formPanel = new FormPanel();
formPanel.setCollapsible(true);
formPanel.setAnimCollapse(false);
formPanel.setFrame(true);
formPanel.setWidth(280);
formPanel.setExpanded(false);
formPanel.setLayoutOnChange(true);

ContentPanel cp = new ContentPanel();
cp.setHeaderVisible(false);
cp.setLayout(new FitLayout());
cp.setSize(250, 140);
cp.add(getGrid());
formPanel.add(cp);

This is the basic layout, pretty simple, eh? The code for the grid itself should not really be important here which is why I left it out (with the getGrid() method), but the results, AFTER I expand the FormPanel is:

http://tinypic.com/view.php?pic=ddorop&s=5

As you can see, the last half of the last item in the grid is cut off, but when I take out the:


formPanel.setExpanded(false);

I get everything rendering fine... However, I really need it to be collapsed by default.

Does anyone else continually find themselves fighting with the grids?? I dont mean to be harsh, but it getting very frustrating, when the examples make it look easy, but there are sooooo many idiosyncrasies with the controls...

Thanks for any help anyone can give
Mark