json 데이터를 서버 (REST API)에 게시하고 싶습니다. 인라인 편집 행을 더블 클릭하면 'serializeRowData'가 호출되고 내 서버는 본문에서 json 형식의 메시지를받습니다. 그러나 호출기에서 작은 '+'아이콘을 클릭하면 'serializeRowData'가 호출되지 않습니다.JQGrid editRow에 JSON 데이터 게시
$("#dbgrid").jqGrid({
url: 'rest/config/dbs',
editurl: 'rest/config/db',
datatype: "json",
height: 255,
width: 600,
colNames:['ID', 'Env', 'Hostname', 'Name', 'Port', 'Service Name', 'SID'],
colModel:[
{name:'id',index:'id', width:30, sorttype:'int'},
{name:'env',index:'env', editable:true, width:50},
{name:'hostName',index:'hostName', editable:true, width:200},
{name:'name',index:'name', editable:true, width:200},
{name:'port',index:'port', editable:true, width:30},
{name:'serviceName',index:'name', editable:true, width:30},
{name:'sid',index:'sid', editable:true, width:30}
],
jsonReader: {
repeatitems: false,
id: "id",
},
rowNum:50,
rowTotal: 2000,
rowList : [20,30,50],
loadonce:false,
mtype: "GET",
rownumbers: true,
rownumWidth: 40,
gridview: true,
pager: '#pdbgrid',
sortname: 'id',
viewrecords: true,
sortorder: "asc",
caption: "Database Servers" ,
ajaxRowOptions : {
type :"POST",
contentType :"application/json; charset=utf-8",
dataType :"json"
},
serializeRowData: function(postdata){
return JSON.stringify(postdata);
}
});
$("#dbgrid").jqGrid('navGrid','#pdbgrid',{edit:true,add:true,del:true}
내가 뭔가를 놓치고 있습니까 :처럼 4.4.1
내 그리드가 보이는
- JQuery와 1.5.2
- 있는 jqGrid :
나는 버전을 사용하고 있습니다?
예제와 함께 도움이 될 경우 대단히 감사하겠습니다.
이봐, 투표를하거나 도움이되지 않는 경우, 대답으로 makr 제공함으로써, 어떤 감사의 표시를 쓰기 일부 의견. –