Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

PropertyGrid.ExpandAllGridItems not working when property tab changes

$
0
0
Hey all,
So I am currently working with the PropertyGrid, and am frequently changing the object being displayed.
I wish to keep all properties expanded whenever we switch to a new object, and usually ExpandAllGridItems has been working like a charm.
But for some reason when I switch property tabs, it refuses to co-operate. My property tab ends up calling a different method, and the object being displayed changes. We then, in that method, call ExpandAllGridItems.

When this method is called from other location all works well. But not in this situation.
I have tried Invoking the method in case of cross thread issues, to no avail.
I have tried calling ExpandAllGridItems within the TabChanged method, did not work.
Oddly enough CollapseAllGridItems has no issue running. Nor does it have issues expanding grid items when necessary (say the current Item selected is within an expandable GridItem. 

I have even created an even that calls ExpandAllGridItems whenever a new object is selected. Yet this NEVER expands the new object.
I am baffled by the inconsistency of this method. Any ideas?

Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>