简体   繁体   中英

How to change jqgrid font size dynamically

我在我的rails项目中使用jqgrid。在不同的页面中使用jqgrid进行了不同的recrors。在一个页面中我需要不同的字体大小,在另一页面中我需要不同的字体大小。在我的视图代码中动态更改喜欢的大小。我需要更改页眉,记录和页脚字体。任何人都可以建议我这样做的方法。

It's not easy. The current code of jqGrid don't use px instead of em . There are options like scrollOffset or cellLayout to be able to fix problems with wrong calculation of column width. So to solve the problem with dynamically font size one have to adjust the width or height of grid and not only to change jqGrid.css . If you don't do this the grid can have unneeded scroll bars.

Shortly I don't recommend you to try to implement dynamic font size in jqGrid because of complexity of the problem. If you do did this it would be good if you share the solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM