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
60
Grid and column widths
posted

Hey,

I am using the IgGrid and wanting it to take 100% of the width of the div so I don't have white space floating around and the scroll bar is where a user would expect. 

In order to achieve the above I set the width to 100%  but forgot to change the columns from 150px to % based. This resulted in the grid taking up 100% of the space (as required) and the scroll was in the right place. However the grid extended the last column by about 400px off to the right of the screen so I had a horizontal scroll bar with one column that was way too long.

So I changed the columns to use a %. I get the same problem but all the other columns are tiny and the last column takes up all this space in addition to the extra space it takes off the screen (so i am effectively left with a single very large column).

So, how can I get an IgGrid fill 100% of space while maintaining a readable grid?

Thanks

  • 24671
    posted

    Hi Joey,

    could you show me the definition of your grid columns , as well as all grid options in fact? The grid supports setting both width %, as well as individual column %. If you set the grid width to 100 %, and the columns width to specific pixels, the last column will extend to stretch to the parent container of the grid, regardless of whether it is defined with a pixel width, or its width is empty.

    Thanks,

    Angel