2009-08-24 34 views
0

JqGridを使用してデータを表示していて、1つの列(InvoiceStatus)に対して編集を有効にしたいとします。jqGrid editRowサーバーへの投稿

問題は、editurl server.phpを呼び出さないということです。

ありがとうございました。行を削除

var lastSel; 
jQuery(document).ready(function(){ 

// Generates the Category Grid, and observes for events, and acts on them 
jQuery("#list987").jqGrid({ 
    url:'php/selectInvoices.php?nd='+new Date().getTime(), 
    datatype: "json", 
    type: "POST", 
    colNames:['InvoicePdfID', 'InvoiceNumber', 'TransactionID', 'InvoiceDate', 'InvoiceStatus', 'QBNumber'], 
    colModel:[ 
     {name:'InvoicePdfID', index:'InvoicePdfID', width:15, hidden:true}, 
     {name:'InvoiceNumber', index:'InvoiceNumber', width:150}, 
     {name:'TransactionID', index:'TransactionID', width:150, hidden:false}, 
     {name:'InvoiceDate', index:'InvoiceDate', width:150},   
     {name:'InvoiceStatus', index:'InvoiceStatus', width:150, editable: true,edittype:"select",editoptions:{value:"Sent:Sent; Paied:Paied; Created:Created"}}, 
    {name:'QBNumber', index:'QBNumber', width:150}  
     ], 
    pager: jQuery('#pager987'), 
    rowNum:10, 
    imgpath: 'themes/sand/images', 
    sortname: 'id',  
    sortorder: "asc", 
    scrollOffset:0, 
    onSelectRow: function(id){ 
     if(id && id!==lastSel){     
      jQuery('#list987').restoreRow(lastSel); 
      lastSel=id; 
     } 
     jQuery('#list987').editRow(id, true); 
    }, 
viewrecords: true, 
editurl: 'php/server.php', 
mytype: "POST", 
caption: "Service Types" 
}); 

答えて

0

試してみてください。

mytype: "POST", 

例:

viewrecords: true, 
editurl: 'php/server.php', 
caption: "Service Types" 
}); 

私はちょうど私が持っている作業グリッドに比べて、私は私のコードであることを置かれたとき、それに失敗しました。

希望すると便利です。 @nbost

関連する問題