3.2.0

Row selector doesn't refresh when I delete a row

Hi everybody,

I'm using a row selector to show the row number in the grid.

obj.setSelectorVisible(true);
obj.setSelectorText(function(i){return this.getRowPosition(i)+1});


The problem is, when I delete a row the selector doesn't update until I scroll the grid up and down several times.

Oddly enough, it works fine when I delete the first row, but not with the others...

I suppose I need to fire any kind of event which refresh the selector, but I don't know which one...

Thanks in advance,

Jose Luis.
Jose Luis (Spain)
April 10,
I'm not sure if it is the best way, but I have solved this issue refreshing the table in the onRowDeleted event:

obj.onRowDeleted = function(row){
    ...
    obj.refresh();
}
Jose Luis (Spain)
April 10,
Yes, you have to refresh the selectors because the row positions are now different. The only possible improvement is to refresh the selectors only (in a cycle row by row).
Alex (ActiveWidgets)
April 10,
How do I refresh the selectors only? I don't see a suitable refresh() method in the class reference. Anyone?
Shawn
December 21,

This topic is archived.

See also:


Back to support forum