Wpf datagrid binding not updating
Yesterday I was working on a small prototype, which I will be blogging about shortly, and ran across the common problem of my bindings not updating.
A very common problem, and one that’s usually a very simple fix once you’ve tracked it down.
But I was having a problem, and it was with the Grid's UI.
My changes and additions were not making their way into the UI display.
I thought that I would capture some of that here so it would be easy to find.What I wasn't doing with that was telling the Datagrid to look at the underlying datasource and refresh the UI from that. Yeah, I did feel a bit silly after finding that out.Of course I blame it on the fact that I've spent too much time in the ASP.It seems that the first instinct to set properties on the cell’s content is to set them through the Data Grid Cell Style when they should instead be set on Data Grid Column. Your View Model will fire the property changed when the collection itself changes – that is if you replace the property itself.