Hi. First time poster.
I'm using a PropertyGrid to display updating integer property values. The properties have only a get. I have more properties than will will fit in the property grid hence it displays a vertical scroll bar. All the properties have appropriate help text. The application updates the integer values in the class given to the property grid in SelectedObject and then calls the propertygrid Refresh method. It does this once every 5 seconds. The values update as expected. You can select any of the immediately visible rows and the help text displays. You can then scroll down and see any of the off screen properties and the values updating. Everything is as it should be.
However, after you have scrolled down and select one of the off screen properties and then scroll back up, when the Refresh occurrs, the grid "automagically" scrolls the selected row back into view. This only happens when the selected row is beneath the original viewable rows. Selecting an upper most row, and then scrolling down does not make it happen.
Is this a bug Does any know of a work around
Thanks,
Michael Eno
remove xyz.

PropertyGrid Property update causes strange scrolling behaviour
Edgar G.
Peter,
Thanks for the reply!
I originally tended to agree that it was by design, but if you say have 25 items in the grid and say the top most 5 are showing, and you select say the third one down and then scroll down to the bottom of the grid and then issue a refresh, the grid does not auto scroll the selected item into view.
Strange behaviour.
I'm building a set of monitoring/control applications for a set of services that we have built for a power plant process monitoring environment. I have several classes that contain just performance counter information and thought that with properly decorated properties, it made an easy way to display updating counter information.
factoryman
Hi,
Based on my testing, I can reproduce the problem.
I think this is by design.
Because when propertygrid is refreshing, it will try to show the selected GridItem into the Active View. This make sense.
Also for your scenario, if we look into the Refresh method by using Reflector, it have its complex implementation. To change the behavior is not a trivial.
http://www.aisto.com/roeder/dotnet/
For your scenario, it seems that you want to update certian Object frequently and Show the Change on the UI. If so, I think you may try to use a TextBox or Panel, or even write a UserControl to do that.
If you still have any concern, please feel free to post here.
Best regards,
Peter Huang
flashdata
Hi ,
Thanks for your feedback. I can reproduce your scenario, I will forward your concern to our product team.
Also I do understand your concern in this scenario, I highly suggest you can
submit this feedback to our product feedback center:
http://lab.msdn.microsoft.com/productfeedback/default.aspx
Because commonly the propertygrid is used to display an object's property, If you look into the Refresh method with reflector, you will see it will do many job. To call the method too frequently may hit the performance.
To make a "monitor" like control as your scenario so far, it would better make a new usercontrol, you can use databinding feature to refresh the data, which should be a workaround.
Thanks for your understanding!
If you still have any concern, please feel free to post here.
Best regards,
Peter Huang