"jqGrid ve hata Durum bir satırın delting: 'Bulunamadı'.

0 Cevap php

I have a problem concern the delting of a row in JQGrid. I have a table editable where it's allow to modify all row in the client side and then save all at the end of modification, It works fine but I have some problem with deleting of row, because it send by post method to a dummy page by default functionality of JQGrid and I have the error:

error Status: 'Not Found'. Error code: 404 94022 Delete selected record(s)?

I imagine that is because it wait a status rensponse of the delete operation. some one know how I can delete row without send anything or to force a status return with some code? Thanks in advance.

benim tablo kodu:

    jQuery('#listBody').jqGrid({
       url:'sow.ajax.php',
    datatype: 'xml',
       colNames:['Pl Section','Id Document','Id Service','Code','Quantity'],
       colModel:[
         {name:'id_parent',index:'id_parent',hidden:false},
         {name:'id_document',index:'id_document',hidden:true},
         {name:'id_service',index:'id_service',hidden:true},
         {name:'code',index:'code', width:80},
         {name:'quantity',index:'quantity', width:80, align:\"right\", sorttype:\"int\", editable: true,editrules:{number:true}}
       ],
     rownumbers:true,
     rowNum:100,
     height:500,
     cellEdit: true,
     cellsubmit: 'clientArray',
     multiselect: true,
     gridComplete : function(){
     var ids = $('#listBody').jqGrid('getDataIDs');
     for(var i=0;i < ids.length;i++){
        var rowdata=jQuery('#listBody').jqGrid ('getRowData', ids[i]);
        service_sow[rowdata['id_service']]=i;
     }

  },
    editurl:'ClientArray',
    rowList:[10,20,30],
    sortname: 'id',
    viewrecords: true,
    sortorder: "desc",
    loadonce: true,
    caption: "Document body",
    pager: '#plistBody'
});

jQuery('#listBody').jqGrid('navGrid','#plistBody',{edit:false,add:true,del:true,search:false});

$('#dedata').click(function(){
  var gr = jQuery('#listBody').jqGrid('getGridParam','selrow');
  if( gr != null ) jQuery('#listBody').jqGrid('delGridRow',gr,{reloadAfterSubmit:false});
  else alert("Please Select Row to delete!");
});

0 Cevap