I encountered the error "Uncaught TypeError: Cannot read property 'errcap' of undefined" in my chrome.
On the firefox, i encountered this one:
I'm using jqgrid 4.8.2.
And here is my code:
$("#Grid").jqGrid({
url: "/Templates/Dometic/Services/DometicGenral.svc/GetVehiclesByOemId",
datatype: 'json',
mtype: 'POST',
height: 'auto',
colNames: [
'Edit',
'ID',
'Vehicle brand',
'Model Information',
'Created by',
'Date created',
'Last modified by',
'Date last modified',
'Manage products'
],
shrinkToFit: true,
colModel: [
{
name: "EditAction",
width: 60,
fixed: true,
search: false,
sortable: false,
resize: false,
formatter: "actions",
formatoptions: {
keys: false,
editbutton: true,
delbutton: false,
editformbutton: false,
onSuccess: function (response) {
if (response.status == 200) {
$("#Grid").jqGrid("setGridParam", { datatype: "json" }).trigger("reloadGrid"); //Reloads the grid after edit
return [false];
} else {
return [true];
}
},
extraparam: {
oper: "edit",
Id: function () {
var sel_id = $("#Grid").jqGrid("getGridParam", "selrow");
var value = $("#Grid").jqGrid("getCell", sel_id, "Id");
return value;
}
},
url: "#"
}
},
//{ name: 'Id', index: 'Id', key: true, sortable: false, search: false, width: 80, title: false, formatter: editcoulmnformatefunction },
//{ name: 'Id', index: 'Id', sortable: false, search: false, width: 60, title: false, formatter: deleteFormatter },
{ name: 'Number', index: 'Number', editable:false, width: 80, searchoptions: { sopt: ['cn'], clearSearch: false }, title: false },
{
name: 'Brand', index: 'Brand', sortable: true, searchoptions: { sopt: ['cn'], clearSearch: false }, title: false,
editable: true, edittype: 'custom', editoptions: {
custom_element: editBrandFormatter,
dataInit: function () { AutocompleteBrand(); }
}
},
{
name: 'Model', index: 'Model', editable: true, searchoptions: { sopt: ['cn'], clearSearch: false }, title: false,
edittype: 'custom', editoptions: {
custom_element: editModelFormatter,
dataInit: function () { AutocompleteModel(); }
}
},
{ name: 'CreatedBy', index: 'CreatedBy', searchoptions: { sopt: ['cn'], clearSearch: false }, title: false },
{
name: 'DateCreated', index: 'Email', searchoptions: { sopt: ['cn'], clearSearch: false }, title: false,
formatter: function (cellValue) { return cellValue!= null? ConvertJsonDateStringToString(cellValue, serverOffset):''; },
},
{ name: 'ModifiedBy', index: 'Telephone', searchoptions: { sopt: ['cn'], clearSearch: false }, title: false },
{
name: 'DateModified', index: 'MobilePhone', searchoptions: { sopt: ['cn'], clearSearch: false }, title: false,
formatter: function (cellValue) { return cellValue != null ? ConvertJsonDateStringToString(cellValue, serverOffset) : ''; },
},
{ name: 'Id', index: 'Id', searchoptions: { sopt: ['cn'], clearSearch: false }, title: false, formatter: manageProductFormatter }
],
pager: '#GridPager',
rowNum: 10,
rowList: [10, 20, 30, 40, 50, 75, 100],
viewrecords: true,
jsonReader: {
records: "records",
total: "total",
page: "page",
repeatitems: false,
id: "Id"
},
sortname: 'Id',
sortorder: 'asc',
loadui: 'block',
autowidth: true,
altclass: 'odd',
altRows: true,
postData: {
OemId: $("#hndOemId").val()
},
toppager: true
});
The error happens when i click on the save icon like the image bellow:
Thanks for your help, guys.
or you can add javascript to your page