I have bound a DataGridView to a BindingList<MyEntity>. MyEntity has some properties that affect other property values. Let's say, because it's true, it has a
DisplayCurrency property that controls what currency is returned in various
Amount properties. I show a list of available currencies, and when the selected currency changes I do something like this:
var list = (BindingList<MyEntity>)grid.DataSource;
foreach (var entity in list)
entity.DisplayCurrency = selectedDisplayCurrency;
AFAIU, ResetBindings() is a way for me to notify the binding list that I've modified its content, and the list will then in turn notify the gridview by firing off an event. And it works fine; all the amounts in the grid are updated.
It's all very wonderful, except for the fact that it seems to behave as if I had removed the datasource and re-assigned it...
- I lose the sort state
- It scrolls to the top
- I lose the selected item
So I guess my question is: Is there any way I can get the DataGridView to just reflect the changed
View Complete Post