读书人

关于PropertyGrid困扰小弟我的有关问题

发布时间: 2012-01-15 22:57:49 作者: rapoo

关于PropertyGrid困扰我的问题
PropertyGrid内属性有:
MyId
MyName
现在光标已经处在MyName上,
如何通过程序让MyName上的值为 "abcde "?


[解决办法]
楼主试一下用如下的方法来设置值:

this.propertyGrid1.SelectedGridItem.PropertyDescriptor.SetValue(this.propertyGrid1.SelectedObject, "aaaaa ");

System.Console.WriteLine(this.propertyGrid1.SelectedGridItem.Value);

读书人网 >C#

热点推荐