We have a data table as shown in the image. There are 3 frozen columns and rest scrollable. The frozen columns are misalligned as shown. If frozen columns attribute is removed, the table looks properly. Any suggestions to solve the problem.
相关问题
- java.lang.NullPointerException at java.io.PrintWri
- h:selectOneMenu in p:dataTable doesn't submit
- Infinite setStatus() loop when requesting a JSF pa
- PrimeFaces block UI does not work when the compone
- primefaces orderlist not getting updated with the
相关文章
- System.OutOfMemoryException:“数组维度超过了支持的范围。”
- Selecting all visible rows after a search using
- how to disable show entries property in jquery dat
- Change the default width of a VuetifyJS DataTable
- change rendered attribute from managed bean
- How to show confirm (richfaces) popup when
- Display DataTable information in aspx page
- How to override primefaces component api class wit
I have had similar issues in the past with frozen datatable and using many different scripts across different posts I have found the below script works in ALL browsers and does not require you to set a height it will calculate it. As an added bonus it also triggers a browser event to force the table to resize properly.
We have the same Problem in a similar use case. As to my knowledge there is no nice solution to this.
The easiest way, as we solved it, is to resize the heights of the smaller tr's and th's every time the datatable is redrawn (including ajax events like sorting etc.)
Another possible way would be to prevent different heights by e.g. stop the lines from breaking.
Primefaces datatable frozen:
Frozen datatable has 2 parts left(fixed) and right(dynamic/scrollable)
Call the above javascript function from your bean like