Hello

I'm trying to do this but I can't! I don't know why.

I have a database table containing tadremarks and I want to show them using a grid. I obtain the data from the database by RPC. Perhaps I'm adding de grid to the panel before the RPC method give me the data?

Some code here:

public MarcasTabItem() {

setClosable(true);
setText(MARCAS_TEXTO);
setIconStyle("marcas_icono_boton");
setLayout(new ColumnLayout());

addListener(Events.Close, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent be) {
AplicacionPanel.cierraMarcasPanel();
}
});

construyeGrid();



}

private void construyeGrid() {

ConsultaServiceAsync servicioConsulta = (ConsultaServiceAsync) GWT
.create(ConsultaService.class);

AsyncCallback<List<Marcas>> callback = new AsyncCallback<List<Marcas>>() {
public void onFailure(Throwable caught) {
Info.display("Aviso", "Fallo al consultar las marcas");
return;
}

public void onSuccess(List<Marcas> listaMarcas) {
setListStore(new ListStore<Marcas>());
getListStore().add(listaMarcas);

setGrid(new Grid<Marcas>(listStore, columnModel));
// getGrid().setContextMenu(menu);
// getGrid().setLoadMask(true);

getPanel().setFrame(true);
getPanel().setAnimCollapse(false);
getPanel().setButtonAlign(HorizontalAlignment.CENTER);
getPanel().setIconStyle("marcas_icono_boton");
getPanel().setHeading("Marcas");
getPanel().setLayout(new FitLayout());
getPanel().add(grid);
getPanel().setSize("100%", "100%");
// getPanel().setBottomComponent(toolBar);

add(getPanel());


return;
}
};

servicioConsulta.marcas("", callback);

}

Help please!

Thank you very much