06:17 02/03/2010
cdukes
Member
posts 13
Post edited 04:18 – 02/03/2010 by cdukes
Hi,
Can someone please let me know what I'm doing wrong?
When I use the following code, I get an error ("no url is set") when I submit the cell edit.
function getWidthInPct(percent){
screen_res = ($(document).width())*0.99;
col = parseInt((percent*(screen_res/100)));
return col;
}
// Admin table var admingrid = jQuery("#sadmin_table").jqGrid({ url:'includes/ajax/json.sadmin.php', datatype: "json", height:'auto', width: getWidthInPct(99), rownumbers: false, colNames:['Name','Value', 'Type', 'Options','Default','Description'], colModel:[ {name:'name',index:'name', width:40, editrules:{edithidden:false, required:true}, editable:false}, {name:'value',index:'value', width:30, editable:true}, {name:'type',index:'type', width:20,editable:true, edittype:"select",editoptions:{value:"enum:enum;int:int;varchar:varchar"} }, {name:'options',index:'options', width:20, editable:false}, {name:'default',index:'default', width:30, editable:false}, {name:'description',index:'description', width:280,editable:true,edittype:"textarea", editoptions:{rows:"10",cols:"40"}} ], gridview: true, emptyrecords: "No Results Found", forceFit: true, rowNum:10, rowList:[10,20,30,40,50], sortname: 'name', viewrecords: true, sortorder: "asc", cellEdit: true, editurl: 'includes/ajax/json.sadmin.php?edit=1', mtype: "POST", pager: '#sadmin_pager', recordtext: "{0} – {1} of {2}", pgtext: "", }); // resize_sadmin_grid(); $(window).resize(resize_sadmin_grid);
// Set pager options jQuery("#sadmin_table").jqGrid('navGrid','#sadmin_pager',{add:false,edit:false,del:false,search:false,refresh:false}); // Remove rollup icon $('.ui-jqgrid-titlebar-close','#gview_sadmin_table').remove();
12:49 05/03/2010
tony
Sofia, Bulgaria
Moderator
posts 7043
Hello,
Please refer here:
http://www.trirand.com/jqgridw …..ll_editing
Regards
Tony
07:25 06/03/2010
cdukes
Member
posts 13
I've read through that – I also just finished reading your 127 page pdf doc. I can't seem to find any examples of the php backend I need to make this work?
I have the grid set up, but when I save the cell, nothing is POST'ing to my php file. Is there any documentation that provides examples?
19:46 09/03/2010
tony
Sofia, Bulgaria
Moderator
posts 7043
Hello,
This is out of jqGrid forum. Imagine what will say people that use ASP or JSP ….
I'm not expert of these. You have the api, you know what is posted, then get the post and do it your way with PHP
Regards
Tony
19:53 09/03/2010
cdukes
Member
posts 13
That's the problem, I don't know what's posted, all I show is this:
_search: false nd: 1268108970517 rows: 10 page: 1 sidx: name sord: asc
So how do I get the select row's ID to post?
16:42 22/04/2012
r.thal
Member
posts 5
Back to your original question about "No url is set", you need to specify the 'cellurl' option (not 'editurl') because you've enabled cellEdit: true.