开发者

.net propertys Grid - How to loop items?

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();
        OptionsPropert开发者_JAVA百科yGrid.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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜