if I have many fixed columns, it takes the whole screen width especially if I display my table on a mobile screen.
how I can set a maximum width for fixed columns?
I know colWidth
takes a function that returns width for a column,
how I can check if the column is fixed or not?
[GH #1017] Set Width for fixed columns
there are only two ways of handling width for columns
- fixed (
colWidths
setup) - fluid (no min and no max)
@aleksandra_budnik
Ok,
How I know if column is fixed or not if i have column index ?
if I knew if column is fixed I can use colWidth function to set its width as I want it,
but how about other not-fixed column, how I can let their width to fit their contents ?
Thanks for your help
Sorry, I might have used inconsistent naming.
Once you set up colWidths
https://jsfiddle.net/wr42ofh6/ for all the columns https://jsfiddle.net/wr42ofh6/1/ or just one you can go back and make them expand automatically.
set colWidth
as array may fix my issue but the problem is that it assign default width
for remaining columns not making its width to fit the content.
Yes, that’s true.
I guess that you can leave auto width for all the columns and use a custom renderer to cut some columns to desired width. Example https://jsfiddle.net/b7L0pcvd/