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?

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi Jason,

    It's hard to know for sure without seeing the behavior. But here are a few wild guesses. :)

    1) You are using AutoFitStyle or AutoFit on the DisplayLayout.If you are using AutoFit, then hiding and showing a column will change the size of that column because when you hide the the column, the other columns resize proportionally and thus become bigger than the hidden column. When you then show the column, it is now proportionally smaller than the other columns which were not hidden.

    2) Using the DotNet grid in VB6 is not something we test or actively support. So this could be an issue with the environment.

Reply Children