3.2.0

obj.clearRowModel() results in missing rows

Hi,

I have a grid for which it is possible to refesh the data with a new set.
Problem is that after a refresh, the last few rows are not visible, in thta
even when you scroll tothe bottom, they dont appear (the data is there though, because if you click on the column header to apply
a different sort, you can find them)

I was using the following code for the refresh (copied from this forum)...

obj.clearRowModel();
obj.clearScrollModel();
obj.clearSelectedModel();
obj.setRowCount(myData.length);
...
obj.setSelectedRows([])
obj.refresh();

Discovered that removing obj.clearRowModel() solves the problem.
Is it OK to do this? Not sure what obj.clearRowModel() is doing, or what
the implications of not calling it are.
Steve M
April 28,
I guess the possible problem might arise if you are using setRowHeight() method and it is cleared with clearRowModel(). If you are using setRowHeight - add it after setRowHeight()...

clearRowModel() method resets all row properties, mainly rowIndices and rowPositions arrays in case of a sorted grid. Unfortunately it also has a 'side-effect' in clearing row height.
Alex (ActiveWidgets)
April 28,

This topic is archived.

See also:


Back to support forum