I have an ObjectListView with a RowFormatter that highlights rows with a property above a user threshold. When the user changes the threshold, I need the control to redraw the items, calling RowFormatter again, so the new threshold will be visually applied. Invalidating the control doesn't seem to do anything. There are 45000 objects in the control, so calling SetObjects again results in a 3-5 second delay. Is there some way to call RefreshObjects() on just the visible objects?
The best I could come up with was executing something like this:
int lvi = myOLV.TopItemIndex;
for (int i = 0; i < 30; i++)
myOLV.RefreshItem((OLVListItem)myOLV.Items[i + lvi]);
whenever the row formatting rules change. This refreshes the first 30 items displayed in the list view; I suppose if someone where using a large, portrait oriented monitor that might not be enough. But it is fast and works for me.