tags:

views:

13

answers:

1

Hi,

Simple question which I can't seem to find the answer on the web.

How do you loop properties in the microsoft propertysgrid control. example code below is the direction I'm heading in....

        AppSettings appSettings = new AppSettings();
        OptionsPropertyGrid.SelectedObject = appSettings;

        foreach(var x in OptionsPropertyGrid.items???

This is the control..

http://msdn.microsoft.com/en-us/library/aa302326.aspx

any ideas?

thanks, jason

A: 

When you bind to a class the items in the class object are changed.

i.e.

AppSettings appSettings = (AppSettings ) OptionsPropertyGrid.SelectedObject; string newvalue = appSettings.orginalFieldName;

jason

jason clark
You should use the comments boxes to reply to answers or other comments, not new questions. And edit your question if you have more information or a clarification.
Codesleuth