Thank you, it was my bad.
But the column width is not changed when I run the below code in the console.
http://output.jsbin.com/netadu
$(‘#demo-jqgrid’).jqGrid(‘resizeColumn’, ‘categoryName’, 20);
$(‘#demo-jqgrid’).jqGrid(‘resizeColumn’, ‘categoryName’, 200);
Thanks.
I tried ‘resizeColumn’ function with my demo code, but I got an error
Uncaught TypeError: Cannot read property ‘colModel’ of undefined(…)
http://output.jsbin.com/netadu
$(‘.demo-jqgrid-container’).jqGrid(‘resizeColumn’, ‘categoryName’, 60);
My demo code refers v 5.2.0
Guriddo jqGrid JS – v5.2.0 – 2016-11-21
Thanks.
Hi,
I want to change font-size dynamically. In my grid, all columns’ width are specified. If there is not enough space, a horizontal scroll bar will appear.
In below demo code, I can change font size
http://output.jsbin.com/netadu
$(‘.demo-jqgrid-container’).css(‘font-size’, ‘6px’)
Original

Smaller font size

If the font size is decreased, I need a way to update the column size, rather than whole grid width. I use horizontal scroll bar if there is not enough width for grid. But I want to the each column width is adjusted when font size changed.
Some functions like
for each column:
var originalWidth = $(‘.demo-jqgrid-container’).jqgrid(‘getColumnWidth’, ‘CategoryName’);
var newWidth = originalWidth * 0.8;
$(‘.demo-jqgrid-container’).jqgrid(‘setColumnWidth’, newwidth);
Thanks.
I am using v5.1.0
|
1 2 3 4 |
* @license Guriddo jqGrid JS - v5.1.0 - 2016-03-15 Thanks. |
It’s perfect if you can offer an example. Thanks.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top