Windows Develop Bookmark and Share   
 index > Windows Forms General > Best way to capture changes made by PropertyGrid?
 

Best way to capture changes made by PropertyGrid?

Hi all,

I'm writing an application in C# where I use PropertyGrids to modify collections of objects. Some of the properties of the objects are also displayed by other controls.

What I'd like to know is how best to intercept the changes made by the PropertyGrid so I can update the other controls.

Right now I've written my own container that has events for when items in the collection are modified. I handle these events and update the other controls. This seems to work fine but I'm wondering if there is a better/easier way to do this. Also, this method could become cumbersome and difficult to maintain if I have to write lots of different containers.

Scythen  Saturday, February 03, 2007 12:01 AM
You could write an handler for the PG's PropertyValueChanged event. I seriously doubt that this would be preferable over handling the change in the property's set accessor. It is a maintenance headache: when you change the object being edited by the PG, you'll be forced to change the PropertyValueChanged handler too.

Off topic for the BCL, moved to Windows Forms General forum.
nobugz  Saturday, February 03, 2007 3:37 PM

You can use google to search for other answers

Custom Search

More Threads

• How can I catch the event when user click the "X" button?
• Help with NumericUpDown
• "Out Of Memory" when open large Tiff images (GDI+)
• Reporting Tools for VB.NET
• value not showing in datagridviewcombo box from the dataset filling the DGV
• Multiextended Listbox
• GotFocus not fired in UserControl when I have a textbox on it
• Navigating ListView
• How to revice a clone of a Control?
• How do i underline first letter on a TabList ?