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

关于PropertyGrid困扰我的问题PropertyGrid内属性有:MyIdMyName现在光标已经处在MyName上,如何通过程序让M

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


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

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

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