Forum



Below is my attempt at a jqGrid 4.4.0 form with local data and Edit & Delete buttons on each row.
I am using the editformbutton option in the formatnoptions.
I am importing the following modules:
jquery.js
jquery-ui-1.8/jquery-ui-1.8.9.custom.min.js
jquery-ui-1.8/jquery-ui-timepicker-addon.0.9.3.js
jquery-validate/jquery.validate.min.js
date.format.1.2.3.js
jquery.jqGrid-4.4.0/css/ui.jqgrid.css
jquery.jqGrid-4.4.0/js/i18n/grid.locale-en.js
jquery.jqGrid-4.4.0/js/jquery.jqGrid.src.js
jquery.jqGrid-4.4.0/src/jqModal.js
jquery.jqGrid-4.4.0/src/jqDnR.js
json2.js
I am currently getting a JavaScript error like this when I hit the 'Submit' button on the Edit form.
Error: TypeError: $.type is not a function
Source File: http://localhost/jquery.jqGrid.....rid.src.js
Line: 52
I'm still unclear as to what is minimally required for the local data to be updated when I hit the 'submit' button in the form.
var mytabledata = [
{id:1, qty:3, item:'xyz', price:10.0},
{id:2, qty:2,item:'abc', price:12.0}
];
$("#mytable").jqGrid({
datatype: 'local',
data: mytabledata,
editRow: true,
editurl: 'clientarray',
fixed:true,
colNames:['', '', '', '', '', ''],
colModel:[
{name:'id',index:'id', width:20, sortable:false, align:'right', hidden:true},
{name:'actedit',index:'actedit',width:20,align:'left',sortable:false,formatter:'actions',
formatoptions:{
editformbutton: true,
delbutton : false,
keys: false
}
},
{name:'qty',index:'qty', width:20, sortable:false, editable:true, edittype:'select', editoptions:{value:"1:1;2:2;3:3"} },
{name:'item',index:'item', width:50, sortable:false, editable:true},
{name:'price',index:'price', width:20, sortable:false, align:'right'},
{name:'actdel',index:'actdel',width:20,align:'left',sortable:false,formatter:'actions',
formatoptions:{
editbutton : false,
delbutton : true,
keys: false
}
}
],
width:280,
sortname: 'id',
viewrecords: true,
sortorder: "desc",
height: 'auto'
}
).navGrid(
"#sc-pager",{edit:false,add:false,del:false}
);
Most Users Ever Online: 715
Currently Online:
56 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66