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
140
Win Grid AutoSize columns.
posted

Can anyone help me how to auto size the colums when the grid is loaded initially.

Thanks. 

 

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi,

        What I usually do is use the InitializeLayout event of the grid. Use e.Layout.Bands and loop throughthe bands collection. On each band, loop through the columns and call the PerformAutoResize method. Be sure to pass in AllRowsInBand to PerformAutoResize - otherwise it will only autosize on the loaded rows and there won't be any at that point. 

Reply Children