Forum
Topic RSS
18:12
03/08/2010
OfflineHI
I am using following configuration to achieve cell edit. But after multiple try also I am not able to see my cell editable. Any help would be appreciated. Also for the first time my grids are not populating. After a back and continue button I am able to see the right data but not able to edit them.
jQuery("#list").jqGrid({
url:"loadReports.htm",
datatype: "json",
ajaxGridOptions: {contentType: 'application/json; charset=utf-8' },
mtype:'POST',
colNames:['Tax Id','TaxId Name', 'Physician Name', 'Specialty','Run Date','Post Date','State', 'Report Type','My Note', 'Review Complete'],
colModel:[ {name:'taxId',index:'taxId', width:55,sorttype:'string'},
{name:'taxIdName',index:'taxIdName', width:70,sorttype:'string'},
{name:'physicianName',index:'physicianName', width:90,sorttype:'string'},
{name:'specialty',index:'specialty', width:40,sorttype:'string'},
{name:'runDate',index:'runDate', width:80, align:"right",sorttype:'date', datefmt:'Y-m-d'},
{name:'postDate',index:'postDate', width:80, align:"right",sorttype:'date', datefmt:'Y-m-d'},
{name:'state',index:'state', width:50,align:"right",sorttype:'string'},
{name:'reportType',index:'reportType', width:70,align:"right",sorttype:'string'},
{name:'myNote',index:'myNote', width:80,editable: true,edittype:"text", editoptions:{size:"20",maxlength:"30"},sortable:false},
{name:'reviewComplete',index:'reviewComplete', width:80,align:"center",editable: true, edittype:"checkbox",editoptions: {value:"Yes:No"},sortable:false}
],
postData:postString,
jsonReader : {
root: "resultRows",
page: "currentPage",
total: "totalPages",
records: "totalRecords",
userdata : 'resultRows',
repeatitems: false,
cell: "",
id: "0",
},
rowNum:10,
rowList:[10,20,30],
pager: '#pager',
sortname: 'id',
viewrecords: true,
sortorder: "desc",
width: 650,
height: 130,
caption:"",
cellEdit: true,
cellsubmit:"remote",
cellurl:"saveNotes.htm",
onCellSelect: function(id, icol, cellcontent, e){
if(id && id!==lastSel){
jQuery('#grid_id').restoreRow(lastSel);
lastSel=id;
}
jQuery('#grid_id').editCell(iRow, iCol, ed);
}
});
Thanks in Advance,
Manoj
Hi Manoj,
You're grid's id is "list" ...
jQuery("#list").jqGrid({
... but your editCell and restoreRow calls are trying to edit a grid with id of "grid_id" ...
jQuery('#grid_id').editCell(iRow, iCol, ed);
... change this to ...
jQuery('#list').editCell(iRow, iCol, ed);
i hope that helps
cHeers,
michael
19:12
03/08/2010
OfflineHi michael,
thanks for a quick response.I have modified my configuration as below but with no success. Just for your information I have not created this configuration in $(document).ready();. Is that causing an issue. Please let me know your suggestions
.....
cellEdit: true,
cellsubmit:"remote",
cellurl:"saveNotes.htm",
ondblClickRow: function(id, iRow, iCol, e){
if(id && id!==lastSel){
jQuery('#list').restoreRow(lastSel);
lastSel=id;
}
jQuery('#list').editCell(iRow, iCol, true);
}
....
Thanks and Regards,
Manoj
Most Users Ever Online: 994
Currently Online:
13 Guest(s)
Currently Browsing this Page:
1 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
Log In
Home