Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
Wingrid Column Sizing Bug?
posted

I have a case where we are integrating some .NET controls with an old VB6 app. The VB app stores some user settings in the registry so that when the user changes column order/sizing in a grid, the app remembers.

In the .NET control i'm using the new wingrid, however there was a very strange behavior i encountered. My column was default Hidden. In the Initialize_layout event, i grab the width setting from the registry, set the column width on this hidden column, and then later in a different method set the Hidden property to false.

The effect was that from the time i set the width to the time the grid shows on the screen, the width has been increased. If the form is closed and subsequently opened, the column will continue to grow. I was able to negate this behavior by setting the column to visible default, but i still don't understand what was going on. Is this possibly a bug or is there something that happens with the siziing on hidden columns that i do not understand?