Encountering a problem with the hidecol
method in jqGrid. Despite calling the method, nothing seems to happen.
Using version 4.5 of jqGrid.
The table is created as follows:
// Table creation using jqGrid
$('#shipTable').jqGrid({
data: tableItems,
datatype: 'local',
autowidth: true,
colNames: ['Name', 'Status', 'Ownership', 'Monitoring', 'Shiptype', 'Departure', 'ETD', 'Destination', 'ETA', 'Delta', 'SOG', 'Speed', 'HFO', 'HFO LS', 'MDO', 'MDO LS', 'RPM 24/H', 'Prop slip 24/H', 'GW 24/H', 'Next service'],
colModel: [{
name: 'name',
index: 'name',
width: 160,
hidden: false
}, {
name: 'status',
index: 'status',
width: 70
}],
rowNum: 100,
height: 400,
scrollOffset: 30,
sortname: 'id',
viewrecords: true,
sortorder: 'desc',
gridview: true,
caption: 'Ships',
pager: '#pager',
toppager: true,
ignoreCase: false,
onSelectRow: function(rowid) {
// some work
}
});
Using jQuery to create checkbox list for managing column visibility.
As a test, all checkboxes currently call this:
$("#shipTable").jqGrid('hideCol', "Name").trigger('reloadGrid');
Although this should be functional, it's not working as expected. Considering any potential conflicts with custom CSS. Any suggestions are welcomed!