I am using a PropertyGrid in a tool application to show a window for monitoring an object in a remote application. Every second or so, I get an update from the application with the status of all members that have changed, and I update the grid. I call Refresh () to make changes. All this works very well, except for one.
Say the object is too tall to fit in the grid for scrolling to be there. The user selected a grid item, but also scrolled up above it so that the selected item was below the bottom of the control.
The problem is that when updating () the control automatically scrolls the grid element in the view (oddly enough, this does not happen when the element is above the top of the control).
I am looking for a way to prevent this or keep the state, update (), and then install it back. I tried to get the base VScrollBar in the PropertyGridView inside the PropertyGrid and mess with "Value", but it does not remain permanently set. It always returns so that the element is in sight.
Deselecting an item during scrolling is my rollback (automatic scrolling to the view does not occur without the selected grid item), but this is a little harmful to usability, so I'm looking for another way.
Does anyone come across something similar?
scobi source
share