Need some help in setting the column width for the datatable. However, the datatable width does not seem to be uniform.The width of the column in the datatable, seems to vary depending on the column header length. please refer the code below.
In the above case, the column header value length 'View Sales History/Forecast' seems to be large and hence the column width also seems to expand depending on the column header text value. Can you please let me know if there is any way to actually maintain uniformity in the column width and that not depend on the column header text value.
In case if the column header text length is too large, is there a way to maintain uniformity in the column width ?? please Assist. Thanks in Advance
if you put the outputText inside a <div> tag, and then put a style="width: 15px;" on it, it would force the contents of the DIV to conform to that width. However, instead of just clipping off the end of the text, it would wrap it. So you mgiht get a column where hte header looks like:
or something similar. Or you could come up with a smaller column header name, and put a tooltip on it to give the full text. That's what we're doing in some of our tables.
subject: setting Column width for primefaces datatable