bindJqGrid("SetPayInvoice", feeID, datasetID, 1);
function bindJqGrid(actionController, feeID, datasetID, step)
{
agreementID = $("#agreementID").val();
mappingTemplateID = $("#mappingTemplateID").val();
invoiceID = $("#invoiceID").val();
var action = '/PayInvoice/' + actionController + '?agreementID=' + agreementID + '&mappingTemplateID=' + mappingTemplateID + '&invoiceID=' + invoiceID + '&feeID=' + feeID + '&datasetID=' + datasetID;
var caption = "Invoice Exception";
$("#headerText").html(caption);
JQGrid(caption, action);
}
function JQGrid(caption, action)
{ $("#tblGrid").jqGrid('GridUnload');
$.ajax({
url: action,
dataType: "json",
mtype: 'POST',
success: function (result) {
if (result) {
if (!result.Error && result != "" && result != undefined) {
$("#TotalData").html(result.records);
$("#divWorkflowWrapper").show();
$("#dvFooter").show();
var colData = "";
colData = columnsData(result.column);
colData = eval('{' + colData + '}');
$("#tblGrid").jqGrid({
url: action,
datatype: 'json',
mtype: 'GET',
colNames: result.column,
colModel: colData,
autowidth: true,
height: 550,
rowNum: 25,
rowList: [25, 50, 75, 100],
loadtext: "Loading...",
pager: '#tblGridpager',
viewrecords: true,
gridview: true,
altRows: true,
cellEdit: true,
cellsubmit: "remote",
cellurl: '/PayInvoice/GridSavecell',
beforeSelectRow: function (rowid) { return false; },
ondblClickRow: function (rowid, iRow, iCol) {
jQuery("#tblGrid").editCell(iRow, iCol, true);
},
afterEditCell: function() {
e = jQuery.Event("keydown");
e.keyCode = $.ui.keyCode.ENTER;
edit = $(".edit-cell > *");
edit.blur(function() {
edit.trigger(e);
});
},
beforeSubmitCell: function (id, cellname, value, iRow, iCol) {
objedit(id, cellname, value);
return { id: id, cellname: cellname, value: value, iRow: iRow, iCol: iCol };
},
afterSaveCell: function (id, cellname, value, iRow, iCol) {
objedit(id, cellname, value);
return { id: id, cellname: cellname, value: value, iRow: iRow, iCol: iCol };
},
caption: caption
});
}
}
else {
$("#divWorkflowWrapper").hide();
$("#dvFooter").hide();
}
},
error: function (xhr, ajaxOptions, thrownError) {
if (xhr && thrownError) {
alert('Status: ' + xhr.status + ' Error: ' + thrownError);
}
}
});
}
j'ai décidé de sauter sur la création de la carte composante lat/long sur mon tableau de bord d'abord, je vais essayer de résoudre ce problème la semaine prochaine. Merci pour les réponses! –