.NET Propertygrid refresh trouble

Posted by osss on Stack Overflow See other posts from Stack Overflow or by osss
Published on 2010-03-31T10:46:13Z Indexed on 2010/03/31 10:53 UTC
Read the original article Hit count: 354

Filed under:
|

Property grid do not show new value of selected object.

For example:

o.val = "1"; pg.SelectedObject = o; o.val = "2";

pg.Refresh();

The property in property grid still "1"; It is changing only if click on this property.. or like that:

o.val = "1"; pg.SelectedObject = o; o.val = "2"; pg.SelectedObject = o;

but in this case focus will be changed to propertygrid.

© Stack Overflow or respective owner

Related posts about c#

Related posts about propertygrid