Does BindingList work this way?

I have a DevExpress GridControl related to a BindingList. I used a BindingList so that the changes are automatically applied to the associated control.

It works great when I add or remove items from a list, but when I change an item, it doesn't stop working the way I want it to.

I created a foreach loop that starts in another thread (to update the user interface thread) that iterates through all the objects in the BindingList and changes some of their properties.

As I expect it to work, it is that each property updates updates in the GridControl in real time. However, the update is very "short." Sometimes it updates 2 rows at a time, sometimes I need to click GridControl to get new values.

Why is this happening?

Is this a good solution to call DataControl.RefreshDataSource()after every item?

+3
source share
2 answers

but when I change an element, it does not stop working the way I want it.

Changes in relation to things inside an element are not something like a BindingList - that is why elements must implement INotifyPropertyChanged.

, LIST , - ;) - .

DataControl.RefreshDataSource() ?

. , INotifyPropertyChange PropertyChanged.

+3

BindingList INotifyPropertyChanged PropertyChanged .

+1

All Articles