C# bindinglist update




















Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 8 years ago. Active 8 years ago.

Viewed times. Improve this question. SoftwareGuy74 SoftwareGuy74 53 1 1 silver badge 4 4 bronze badges. Add a comment. Active Oldest Votes. Improve this answer. Rohit Vats Rohit Vats I was kinda hoping it wouldn't have to come down to that. The biggest issue with this approach is now the particular implementation has to be aware of this and explicitly call the grid. I'd like that change reflected in the grid. Unfortunately, in the actual project I'm working on, the only connection between where the data is set and where the grid resides is that list.

Calling some sort of refresh on the grid isn't an option. It seems like simply updating the collection my grid is bound to should be enough. Is there something I'm missing?

INotifyPropertyChanged must be be implemented on classes you put in a BindingList if you wish for the BindingList to detect changes to properties of an item in the list otherwise it will only raise notifications for changes to the list itself; adding or removing items. I would like to make the cell momentarily change color when the data is changed in that cell. Is there a grid event that fires when the underlying data changes when using a bindinglist and the onpropertychanged notifiers?

I was trying to go one step further and get the old value vs the new value to determine if the cell gets a different color. Based on your code, I added to the code below, but was not able to get the old value.

Am I using this correctly? PropertyName]; cell. PropertyName]; System. Print oCell. Value ; cell. Red; System. Sleep ; cell. Telerik UI for WinForms. This is a migrated thread and some comments may be shown as answers.



0コメント

  • 1000 / 1000