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
615
Resize row to grid width
posted

Hi,

after adding a new row or updating data, I would like for the wingrid to automatically resize the rows. There are some resize functions but I cannot get them to work the way I want them to.

What I would like is a resized row, depending on the data in the columns (so columns with more data get greater width), which always takes the full grid width. Only when the data is really too much to fit in there I could live with scrollbars, but rather not.

How to acheive this?

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi,

        I think you will want to set AutoFitStyle to get the colmuns to fill the width of the grid.

        To automatically size a column to it's content, you can use the PerformAutoResize method of the grid.  I'm pretty sure that if you call PerformAutoResize on every colmun in the grid and the total width happens to be wider than the grid, then the AutoFitStyle will not be honored, which it what you want.

Reply Children
No Data