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
470
Column sizing in WinGrid
posted

Hi,
how can I configure the columns of a grid (5 columns), that only column 3 and 5 take rest of the space inside the grid, but column 1, 2 and 4 are autosized by content?

Michael 

 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi Michael,

    I think what you can do is set AutoFitStyle to size all of the columns. Then in the InitializeLayout event, call PerformAutoResize on columns 1, 2, and 4. Then set the MinWidth and MaxWidth on those columns to their current (autosized) width. This way, those columns will be sized to their content and locked in place and the other columns will be the only sizeable ones. 

Children