I know this should be an easy thing, but for the life of me, I can't figure it out.
I need to iterate the properties and associated values in a propertygrid control. I don't know ahead of time what control the propertygrid will be attached to, so I simply want to run through each GridItem and get the property name and value.
This doesn't work, but just to give you an idea of what I want to do:
Dim pg As New PropertyGrid
pg.SelectedObject = New TextBox
For Each gi As GridItem in pg
Debug.WriteLine(gi.PropertyName & " = " & gi.PropertyValue)
How the heck do I do this?