:: Forum >>

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)
Monday, April 10, 2006
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)
Monday, April 10, 2006
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)
Monday, April 10, 2006
How do I refresh the selectors only? I don't see a suitable refresh() method in the class reference. Anyone?
Shawn
Thursday, December 21, 2006

This topic is archived.


Back to support forum

Forum search