I have following JqGrid with a checkbox column:
$(document).ready(function() {
$("#tblJQGrid").jqGrid({
url: 'Home/GetDataForCompanyJqGrid',
datatype: "json",
mtype: 'GET',
colNames: ['CompanyID', '', 'Offices'],
colModel: [
{ name: 'CompanyID', index:'CompanyID', key:true, hidden:true},
{ name: 'check', index: 'check', width: 50, align: 'center', editable: true, edittype: 'checkbox', editoptions: {value: "True:False"}, formatter: "checkbox", formatoptions: {disabled: false}},
{ name: 'Description', index: 'CompanyName', width: 200, align: 'center' }],
rowNum: 10,
data: {},
sortname: 'CompanyName',
viewrecords: true,
sortorder: "desc",
height: "auto",
caption: "List Offices:"});
});
My JqGrid contains a checkbox column and I want to post the value of my CompanyID
column, if the rows' checkbox is checked, to my MVC controller. I tried to post all rows' values first to my MCV ActioResult
by specifying a action in my html form action="@Url.Action("ExportData", "MyControler")"
but I only get null in my ActionResult.
Can anyone help me with an idea how I can achieve to post values from my jqgrid to my MVC ActionResult?