Like you can read on http://www.trirand.com/jqgridwiki/doku.php?id=wiki:table_to_jqgrid the options parameter of tableToGrid
method is nothing more as the options of the jqGrid which you create (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:options).
If I undesnand your main problem carrect, you have some data received from the server as an answer on the form submit. And you want to place this data in a grid. To make this you can use more direct way with using datatype: 'local'
of jqGrid. Here is an example:
var grid = jQuery('#list').jqGrid({
caption: 'Testclusters',
height: 'auto',
gridview: true,
rownumbers: true,
sortable: true,
datatype: 'local',
viewrecords: true,
pager: '#pager',
pgbuttons: false,
pginput: false,
rownumbers: true,
colNames: ['Name', 'Testtiefe', 'Std', 'FachlicheTests', 'RowVersion'],
colModel: [
{ name: 'Name', index: 'Name', width: 120 },
{ name: 'TesttiefeName', width: 180 },
{ name: 'Std', width: 21, formatter: 'checkbox', align: 'center' },
{ name: 'IsFachlicheTests', width: 21, formatter: 'checkbox', align: 'center' },
{ name: 'RowVersion', width: 50, hidden: true }
]
}).navGrid('#pager', { edit: false, add: false, del: false, refresh: true, view: false, search: false })
.navButtonAdd('#pager', { caption: "", buttonicon: "ui-icon-calculator", title: "choose columns",
onClickButton: function() {
jQuery('#list').jqGrid('columnChooser');
}
});
grid.jqGrid('gridResize');
var myData = [
{ Name: "VIA XP", TesttiefeName: "Alle SW-Produkte", Std:true, IsFachlicheTests:false, RowVersion: "20FC31" },
{ Name: "KUBUS", TesttiefeName: "Alle SW-Produkte", Std:false, IsFachlicheTests:true, RowVersion: "20FC32" }
];
for (var i = 0; i <= myData.length; i++) {
grid.addRowData(i + 1, myData[i]);
}
First of all you create an empty jqGrid and then fill it with respect of addRowData
method.
Moreover if you have many checkboxes inside of jqGrid, it can be interesting for you to look at my example from http://stackoverflow.com/questions/2705174/vertical-textes-inside-of-table-headers-with-respect-of-a-javascript-based-on-svg and see results on http://www.ok-soft-gmbh.com/VerticalHeaders/TestFixedO1.htm.