PDA

View Full Version : Grid render problem



Yukideluxe
22 May 2009, 12:37 AM
- Detailed description of the problem:

I've have a grid in a Window and before I show the window I update the grid's store. The first time all it's okey and the grid renders fine, but if I close and open the window again the grid renders weird (the autoexpandcolumn it's not expanded for example) It didn't happen with 1.2

- GXT version: 2.0.1
- Host mode / web mode / both: Both
- Browser and version: IE7, Firefox 3.0
- Operating System: Windows
- Sample code:


public class Test implements EntryPoint {

private Window window;
private ListStore<Stock> store;

public void onModuleLoad() {

window = new Window();
window.setSize(500, 500);
window.setLayout(new FitLayout());
window.setMinimizable(true);
window.setMaximizable(true);

gridExample();

Button b = new Button("Click", new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent ce) {
addStock();
window.show();
}
});

RootPanel.get().add(b);

}

public void gridExample() {

List<ColumnConfig> configs = new ArrayList<ColumnConfig>();

ColumnConfig column = new ColumnConfig();
column.setId("name");
column.setHeader("Company");
column.setWidth(200);
configs.add(column);

column = new ColumnConfig();
column.setId("symbol");
column.setHeader("Symbol");
column.setWidth(100);
configs.add(column);

store = new ListStore<Stock>();

ColumnModel cm = new ColumnModel(configs);

Grid<Stock> grid = new Grid<Stock>(store, cm);
grid.setAutoExpandColumn("name");
grid.setBorders(true);

window.add(grid);

}

public void addStock() {
store.removeAll();
store.add(TestData.getStocks());
}
}
I attach two images, the first case and then when I close and open the window again!

Thank you!

PD: While I was writing this post I've changed the order of the actions and if I show the window first and then update the store and it works OK! Why?

Yukideluxe
3 Sep 2009, 2:16 AM
Hi!

I recover this post because I'm having the same issue with version 2.0.1

Sorry for the inconvenience.

sven
3 Sep 2009, 3:05 AM
If something is hiddenm browsers cant layout it correctly. You will need to first show the window and than update it. Moving this to the help forum,.

Please use the forum search next time as this was discussed several times.

pourmo
3 Sep 2009, 3:18 AM
Hi
I don't seem to be able to create a new Thread I get this error message
"The string you entered for the image verification did not match what was displayed."
But I don't see the Image Verification Box on new Thread

regards
mo

edcon
20 Sep 2009, 2:17 PM
i have the same error:
The string you entered for the image verification did not match what was displayed.

I want to start a new thread, but this message alway appear me, i dont know why, because the recaptcha never show it. how can i create a new thread?

Arno.Nyhm
21 Sep 2009, 6:43 AM
i send a message to sven.