:: Forum >>

Is posible load a new array in the grid?

I test the grid and i've got a problem for reload the grid with a new array. I've got a grid with array's data source and i want refresh with other array but i set the obj.setCellData(myCells) and the grid don't refresh with the new information.

Is posible load a new array in the grid?

Thanks
Benja
Thursday, February 1, 2007
Yes, if you have the same number of rows/columns -

obj.setCellData(myCells);
obj.refresh();

Otherwise you should clear the grid (or at least rows model) -

obj.clear();
...

or

obj.clearScrollModel();
obj.clearSelectedModel();
obj.clearSortModel();
obj.clearRowModel();
obj.setRowCount(...);
obj.refresh();


Alex (ActiveWidgets)
Thursday, February 1, 2007
My problem was that the numbers of row was different.

Thanks
Benja
Thursday, February 1, 2007
Try setting the row count using obj.setRowCount(number) before refreshing the grid.

Ankur
Ankur Motreja
Thursday, February 1, 2007
i want to insert only one row to the grid.How can i do that?
bibhu
Friday, February 23, 2007
insted of usign a fixed value for row number use variable.length property
after reset and refresh
seb
Thursday, March 8, 2007

This topic is archived.


Back to support forum

Forum search