We're seeing some weird behavior on our grid lately. The grid no longer updates (repaints) itself when the underlying bound data changes. It looks as if you have to use your mouse cursor to "rub" the grid cells to make them repaint and change...
This one might be the result of a change made by one of my colleagues but we've lost track of the change. Is there any property which sets how the grid updates itself? Could someone give me a bit of direction on where i should really be looking at to fix this issue...
Thanks!
What kind of data source are you using? Typically, the grid updates itself based on a notification from the data source. So if your data source used to implement IBindingList (which sends these notifications) and now only implements IList (which does not), then that could account for the change.
Thanks for the reply, Mike.
We use a specialised collection object which extends BindingList and sends the notifications and the data source implementation has not changed recently.
When the cells invalidate and need to repaint (e.g. having the mouse cursor gliding over them), do the cells explicitly query the underlying bound data to redraw? The Grid does not update the displayed values unless it repaints.
I'm still trying to understand why the "rubbing" would happen...
Hi,
Sorry about that. It seems to be a bug in the forum software. Sometimes it sends updates for posts that haven't been updated in a long time. I get them, too.
I thought it would be fixed when we updated to our new forums, but apparently not.
Hey Mike.
Yes - indeed we've found that the rubbing issue was due to our collection not sending updates properly due to a key hashing issue.
Thanks.
P.S. I've somehow received 6 pairs of email updates re this post, of exactly the same content (12 of them!) since last night - "Post Approved" - is that some new feature of the forum?
Yes. The grid doesn't store the data from the data source. When the mouse moves over a cell or the cell repaints for any reason, it has to get the value from the data source. So it makes sense that this would happen.
The question is, why isn't the grid receiving the notificaiton when the data has changed. That notification is triggered by the data source's IBindingList implementation.