3.2.0

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
February 1,
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)
February 1,
My problem was that the numbers of row was different.

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

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

This topic is archived.

See also:


Back to support forum