I would like to change the width of a jqGrid. I tried to set the width in my griddefinition:
width: '800px'
Is there another way?
Rows can be selected in ParamQuery Grid either by user action or programmatically. All rows can be selected using Ctrl - A or Cmd - A (Mac).
The value of sidx parameter will be constructed from sortname option of jqGrid and the value of sord from sortorder . So you should do the following: $('#yourgrid'). jqGrid('setGridParam', {sortname: 'yourColumn', sortorder: 'asc'}).
Read all dataIDs from grid:getDataIDs(); You can iterate on grid based on ID list. Then you will get row using dataID. When your entire row get done then you can get the cell value.
jqGrid is an Ajax-enabled JavaScript control that provides solutions for representing and manipulating tabular data on the web.
You could use the setGridWidth
property
$('#gridId').jqGrid('setGridWidth', '800');
If you want the grid to re-size dynamically, hook into the window re-size function, but remember to set the initial width
var DataGrid = $('#gridId');
//sets the grid size initially
DataGrid.jqGrid('setGridWidth', parseInt($(window).width()) - 20);
//handles the grid resize on window resize
$(window).resize(function () {
DataGrid.jqGrid('setGridWidth', parseInt($(window).width()) - 20);
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With