I Found dialog with text “No url is set” when edit row at jqgrid. After press enter, i found dialog with text “No url is set”.
anyone can help me about this problem?
This is my jqgrid code
function callIdGrid() {
var lastSel;
jQuery("#id_grid").jqGrid({
height:200,
width:655,
colNames:['Name','Address','Amount'],
colModel:[{
name:'acctId',
index:'acctId',
width:150,
editable:true
},{
name:'address',
index:'address',
width:150,
editable:true
}
},{
name:'amount',
index:'amount',
formatter:'currency',
width:150,
editable:true
}],
pager: '#id_pager',
sortname: 'acctId',
viewrecords: true,
sortorder: "desc",
caption:"Accounts",
cellEdit: true,
editurl:"noabjad.json",
onSelectRow: function(acctId){
if(acctId && acctId!==lastSel){
jQuery('#id_grid').jqGrid('restoreRow',lastSel);
jQuery('#id_grid').jqGrid('editRow',acctId,true,onSaveSuccess);
lastSel=acctId;
}
}
editurl: 'clientArray'
}) ;
jQuery("#id_grid").jqGrid('navGrid','#id_pager',{
add:true,
del:false,
search:false,
edit:true
},{
reloadAfterSubmit:false
},{
reloadAfterSubmit:false
}).navButtonAdd("#id_pager",{
caption:"",
buttonicon:"",
onClickButton:function(){
var datarow = {acctId: "", address: "", amount: ""};
var su=jQuery("#id_grid").addRowData("X",datarow,"first");
if(su) { jQuery("#id_grid").setSelection('X') }
}
});
function onSaveSuccess(xhr){
response = xhr.responseText;
if(response == 1) return true; return false;
}
}
How many grids are on the page? In the code which you posted you defines jqGrid
"#id_grid"with the pager “#id_grid”. On the other side inside ofonClickButtonof thenavButtonAddand inside of theonSelectRowyou use inline editing of another grid:"#TransaksiDisbursed".Did you defined
editurlparameter (likeediturl: 'clientArray') for the second ("#TransaksiDisbursed") grid or existing"#TransaksiDisbursed"in your code is just cut&paste error?