3.2.0

problem with grid in a AW.UI.Tabs

I'm inserting data in 2 aw.grids. Both of them are in AW.UI.Tabs. One of the grids is visible to the user and the other one (that is placed in a diferent tab is not).

The one that is visible to the user presents all the data perfectly in real time, but when I change the tab to check the other one...the data is not there...but if I change tabs once or twice...eureka...the data magicly appears...

Alex/Folks ....Any Ideas?

Rodrigo
November 1,
thegrid.refresh(); ?
Karl Thoroddsen
November 1,
I'm already doing the grid.refresh right after I insert the data. The data insert script follows bellow:

gridSaldo.clearRowModel();
gridSaldo.clearScrollModel();
gridSaldo.clearSelectionModel();
gridSaldo.clearSortModel();
gridSaldo.refresh();

var listaSaldoPropriedade = XmlToObject(http_request.responseXML,nome_metodo);

if (listaSaldoPropriedade[nome_metodo+'Result'] != null)
{

var len = listaSaldoPropriedade[nome_metodo+'Result'].length;
listaSaldoPropriedade = listaSaldoPropriedade[nome_metodo+'Result'];

for (var i = 0; i < len; i++)
{


CellsSaldo[i] = [listaSaldoPropriedade[i].especieFaixa.especieAnimal.nmEspecieAnimal,
listaSaldoPropriedade[i].especieFaixa.faixaAnimal.nmFaixa,
listaSaldoPropriedade[i].qtMachos,
listaSaldoPropriedade[i].qtFemeas,
listaSaldoPropriedade[i].qtTotal,
listaSaldoPropriedade[i]];
gridSaldo.addRow(i);
}
gridSaldo.refresh();

}
Rodrigo
November 1,
I think you have to se the rowcount.

grid.setRowCount(count);
grid.refresh();
Kris
November 1,
the setRowCount didn't work too....thanx anyway
Rodrigo
November 1,
Has the data arrived when you refresh? Also is the Grid inside a div?
Karl Thoroddsen
November 1,
plz hlp us
November 3,
Set an alert before the .refresh. Can you see the data?
Is the grid within a <div>? Try removing it.
Karl Thoroddsen
November 3,
I put an alert before the grid.refresh()

something like this:

var teste = gridSaldo.getCellValue(1,1);
alert('value '+teste);

and the data is actually there...it is just not showing the first time I check in the tab.

The grid is not in a div...actually...I create everything dynamicly, via javascript. There are no html files in my application.

Thanx

Rodrigo
November 3,
Folks,

In order to make this a better world with peace, reason and good will, here is the solution to the problem reported above...

As we moved further with the active-widgets-mania, we found a few "technical difficulties" that slowed us down.

The delete row problem was a big one and the refresh on grids hidden in invisible tabs.

In order to solve this problem, along with a few orders, we started setting all the data, directly in the grid. Bellow there is some code samples that we are using:

var gridCount = gridMovimentacao.getRowCount();

gridMovimentacao.addRow(gridCount);
gridMovimentacao.setCellText(listaEspFaixa[i].especieAnimal.nmEspecieAnimal,0,gridCount);
gridMovimentacao.setCellText(listaEspFaixa[i].faixaAnimal.nmFaixa,1,gridCount);
gridMovimentacao.setCellText('0',2,gridCount);
gridMovimentacao.setCellText('0',3,gridCount);
gridMovimentacao.setCellText('0',4,gridCount);

As soon as we started using this approach, the problems started to disappear (delete rows, checkboxes values, data refresh in invisibles grids...).

All the best....
Rodrigo
November 7,

This topic is archived.

See also:


Back to support forum