Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PropertyGrid problem

0 views
Skip to first unread message

John Brown

unread,
Feb 8, 2007, 7:14:14 PM2/8/07
to
Hi there,
 
I've created an expandable "PropertyGrid" control that initially looks like this when fully expanded (you'll need a fixed-space font in your news-reader to see it properly aligned):
 
-Name
  -Dimensions  10,20
       Width   10
       Length  20
 
 
As soon as I type in a name for the "Name" property however and press <Enter>, the grid then looks like this:
 
 
-Name          Whatever
  +Dimensions  10,20
       Width   10
       Length  20
 
Notice the "+" that now appears beside the "Dimensions" property. The grid automatically closed the "Dimensions" property IOW (why?) but didn't clear out the "Width" and "Length" beneath it. It appears to be a cosmetic problem only since if I call "PropertyGrid.Refresh()" it does clear it. Does anyone know what's going on here. I don't see why it should close "Dimensions" in the first place but even if it does, why isn't it clearing out the "Width" and "Length" rows. Thanks.

Stoitcho Goutsev (100)

unread,
Feb 9, 2007, 10:10:47 AM2/9/07
to
Try to apply RefreshPropertiesAttribute attribute to your property. This will trigger refreshing of the property grid when its value changes.
 

--
HTH
Stoitcho Goutsev (100)

John Brown

unread,
Feb 9, 2007, 10:39:31 AM2/9/07
to
> Try to apply RefreshPropertiesAttribute attribute to your property.
> This will trigger refreshing of the property grid when its value changes.
 
Thanks. I since discovered that which makes life easier than invoking "PropertyGrid.Refresh()". I'm still not sure why it collapses "Dimensions" in the first place however. If it's not a bug then it's certainly a questionable design decision (not ergonomically correct IMO). At the very least the grid should refresh itself. Anyway, thanks again.
0 new messages