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
230
Column Settings
posted

With the Grid's column settings, I had my first and last columns LockedWidth set to true. They are actually my icons.

 

I have my grid AutoFitStyle set to ResizeAllColumns because I want my grid to fit on the screen no matter what. Other columns will expand or shrink other than the locked columns.

 

The problem is the Locked columns resize with the grid.

 

How can I make those columns width really fixed?

Parents
No Data
Reply
  • 69832
    Suggested Answer
    Offline posted

    The LockedWidth property only prevents the user from resizing the column by dragging the right edge, it doesn't have any bearing on the AutoFitStyle functionality.

    I tried setting AutoFitStyle to 'ResizeAllColumns' and handling the Resize event to force the width of the first and last columns to some fixed value; it wasn't perfect because the column width is changed before the event fires, but you might want to try this and see if you can live with it.

Children