Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / February 2007

Tip: Looking for answers? Try searching our database.

PropertyGrid problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Brown - 09 Feb 2007 00:14 GMT
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) - 09 Feb 2007 15:10 GMT
Try to apply RefreshPropertiesAttribute attribute to your property. This will trigger refreshing of the property grid when its value changes.

Signature

HTH
Stoitcho Goutsev (100)

 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.
John Brown - 09 Feb 2007 15:39 GMT
> 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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.