开发者

.net propertys Grid - How to loop items?

开发者 https://www.devze.com 2023-01-04 00:57 出处:网络
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....

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

精彩评论

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