How to get a PropertyGrid's cell value

  • Thread starter Thread starter Dean Slindee
  • Start date Start date
D

Dean Slindee

Using a propertyGrid to allow input of parameter values. I need to get both
each property name and property value for each property name/value pair show
in the property grid. I can get the property name thus, but how do I get
the associated value string?
Dim pdc As PropertyDescriptorCollection =
TypeDescriptor.GetProperties(PropertyGrid1.SelectedObject, True)

Dim pd As PropertyDescriptor

For Each pd In pdc

strPropertyName = pd.Name

strPropertyValue = ???

Next



Thanks,

Dean Slindee
 
That's what I needed. Thanks Jay
Jay B. Harlow said:
Dean,
Have you tried PropertyDescriptor.GetValue?


strPropertyValue = pd.GetValue(PropertyGrid1.SelectedObject)


Hope this helps
Jay
 
Back
Top