Posted 15 years ago
by David Sherwood
I wonder if there is a way to handle dynamic properties by binding to ItemSource rather than rebuilding the properties collection.
I have a database of properties. Each row represents a property with one column the name and one column the (string) value.
I created my own class inheriting from PropertyGridPropertyItem where I override the Value property to update my data row. And then I rebuild the properties collection every time the database property list changes.
I would rather bind a collection to ItemsSource and let binding process handle the dynamic changes. Can this be done? The documentation says you can bind ItemsSource to any collection but doesn't say how.
[Modified at 03/15/2010 07:24 PM]
I have a database of properties. Each row represents a property with one column the name and one column the (string) value.
I created my own class inheriting from PropertyGridPropertyItem where I override the Value property to update my data row. And then I rebuild the properties collection every time the database property list changes.
I would rather bind a collection to ItemsSource and let binding process handle the dynamic changes. Can this be done? The documentation says you can bind ItemsSource to any collection but doesn't say how.
[Modified at 03/15/2010 07:24 PM]