How to get PropertyGrid to edit an array of my own properties
Posted on 2004-09-28
Hi good people!
The PropertyGrid control is a very nice control if you want to edit the members of an object that are exposed as public properties.
I want to do the same thing, but I want to edit an array of properties, rather than the properties of an object. In other words, I would like to create an array of name, value pairs and edit them with the PropertyGrid.
I suppose I might be able to use the CodeDOM to dynamically create a class that presents the data, then present it in a property sheet, but this seems like using a slege hammer to kill a gnat...
Does anyone have a clue as to how you would use the PropertyGrid to let users edit elements that I dynamically create?