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
960
autosizing columns
posted

Hi,

I have a grid with a number of columns.  Some of them are hidden and only few are shown to the user.

The grid's dock property is set to fill so it fills the form at all times.

How can I set the columns to autosize themselves to always fill the grids' client area's width?

I don't want to see the blank space after the last column. 

That way every time the grid is resized, the columns would resize as well.

Is this something I have to do per column? 

 

Thanks,

Parents
No Data
Reply
  • 1803
    Verified Answer
    posted

    Hi Marc,

    e.Layout.AutoFitStyle = AutoFitStyle.ExtendLastColumn --> only the last column will extend

    e.Layout.AutoFitStyle = AutoFitStyle.ResizeAllColumns  ---> all the columns are resized to fit the grid

    Set amyone of the above properties to get your columns occupy the entire breadth of the grid spacce....

     

    hppy Koding,

    Arun

Children
No Data