tags:

views:

676

answers:

1

I am using GWT 1.6.4 and GWT-Ext 2.0.6. I am trying to use EditorGridPanel and facing rendering problems.

When the module loads I create a Panel (TopPanel) with BorderLayout and add that to the ViewPort. I then create another Panel (CenterPanel) and add EditorGridPanel, three buttons to the center of the BorderLayout Panel (TopPanel). I tried many layouts for CenterPanel but still not able to get what I want.

I want the table to showup with the required data and scrollbars. All the three buttons comes below the table. The data for the table come via Async call when the module loads, so when the screen is rendered to the user, the data is populated in the table. But looks like the table gets rendered with no data and when the async process finishes the table gets populated but don’t get resized to fit the screen so only show me one row.

The problem is with the Grid, I am not getting any scrollbars. Secondly I don’t want to define the height and width of the Grid. I want it to take as much as possible and show scrollbars, just like we do in html table by setting width and height as 100%.

Thanks

A: 

I have found the solution. I had to add the Grid on a panel. I had to set the layout of that panel to FitLayout(). Secondly had to call doLayout() on that panel after loading the Store with the data. I now get the scrollbars for the table as well as it fits the whole available space.

Bhushan