WPF datagrid live-update with button-column

Posted by dlang on Stack Overflow See other posts from Stack Overflow or by dlang
Published on 2010-06-01T19:35:34Z Indexed on 2010/06/01 19:43 UTC
Read the original article Hit count: 200

Filed under:
|

Dear All!

I have a datagrid which contains bid and ask - prices for currency-symbols. The data is updated every seconds. I update the data by creating a new collection of my viewmodel-entities and bind this collection to the datagrid every second.

The problem is: Because my datagrid contains a template-column with a button "buy", this button is also recreated every second! This means, that when the user hovers the button, the hover-styles blinks, as the button is recreated every second. Additionally sometimes the click-event is not fired correctly, if the button is recreated while the user has his mouse-left-button pressed.

Any suggestions, how to solve real-time-update a datagrid with button-columns?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about datagrid