Reputation: 25969
I have a BindingList of type User, the User object has several properties (UserName, Password, etc). So I tied an event handler to the BindingList.ListChanged event, and it works fine when adding or deleting a user, BUT, if a user property changes, it does not raise the event, is there any way to achieve this?
bindingListUsers.Add(someUser); // This raises ListChangedEvent
bindingListUsers.Delete(someUser); // This raises ListChangedEvent
bindingListUsers[0].UserName = "Another user name"; // This does NOT raise the event
Upvotes: 6
Views: 5232
Reputation: 19846
The only way I can think of is define an event in User class which is fired when a property value is changed (you have to write code manually for that). Then create a wrapper class of binding list. Handle both list events and user class events in that class.
I can elaborate more if you like the idea...
Upvotes: 0