0

我正在使用 JqGrid 来显示一些数据,并希望为一列(InvoiceStatus)启用编辑。

问题是,它不调用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"
});
4

1 回答 1

0

尝试删除该行:

mytype: "POST", 

例子:

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

我只是将其与我拥有的工作网格进行了比较,当我将其放入我的代码中时它失败了。

希望这可以帮助!

  • @nbost
于 2011-12-13T02:55:31.603 回答