如何从jqgrid clientArray获取数据?

时间:2015-11-12 16:28:01

标签: php jqgrid

您好我正在尝试从我的网格访问数据但我无法从clientArray获取数据我使用此代码我不知道如何在获取数据之前获取数据发送到远程服务器

 var dataGridNuevaCajaMatriz = [{
                '40': 0,
                '50': 0,
                '60': 0,
                '70': 0,
                '80': 0,
                '90': 0,
                '100': 0,
                '110': 0
            }];

            jQuery("#grid_nueva_caja_matriz").jqGrid({
            data: dataGridNuevaCajaMatriz,       
            datatype: "local",
            //datatype: "json",
            loadonce: true,         
            /*height:'400',*/
            colNames:['40','50','60','70','80','90', '100', '110'],
            colModel:[
            //{name:'seleccion',index:'', width:50, align: 'center',editable: false, formatoptions: {disabled : false}, editoptions: {value:"1:0" },editrules:{required:false}},
            {name:'40',index:'40', width:50, align:"center",editable:true},
            {name:'50',index:'50', width:50, align:"center",editable:true}, 
            {name:'60',index:'60', width:50, align:"center",editable:true}, 
            {name:'70',index:'70', width:50, align:"center",editable:true}, 
            {name:'80',index:'80', width:50, align:"center",editable:true}, 
            {name:'90',index:'90', width:50, align:"center",editable:true}, 
            {name:'100',index:'100', width:50, align:"center",editable:true},
            {name:'110',index:'110', width:50, align:"center",editable:true},   
            ],
            rowNum:999999,
            pager: '#pager_nueva_caja_matriz',
            toppager:false,
            pgbuttons:false,
            pginput:false,
            rowList:false,
            gridview:false, 
            shrinkToFit: false,
            jsonReader: {
            repeatitems : false,
            cellEdit: true,
            cellsubmit : 'clientArray',
            editurl: 'clientArray', 
            },      
            loadError: function (jqXHR, textStatus, errorThrown) {
            message_error('ERROR','HTTP message body (jqXHR.responseText): ' + '<br>' + jqXHR.responseText);
            },
            //ondblClickRow
            onSelectRow: function(){
                var row_id = $("#grid_nueva_caja_matriz").getGridParam('selrow');
                jQuery('#grid_nueva_caja_matriz').editRow(row_id, true);
            }
            });

            jQuery("#form_nueva_caja_matriz #grid_nueva_caja_matriz").jqGrid('navGrid','#pager_nueva_caja_matriz',{edit:false,add:false,del:false});

如何获取数据clienteArray我无法得到这些。请帮我 感谢

1 个答案:

答案 0 :(得分:0)

jqgrid手册说,如果您在"clientArray"模式下使用它,则不会需要editurl参数。 http://www.trirand.com/jqgridwiki/doku.php?id=wiki:cell_editing

此较旧的帖子在clientArray模式下遇到了一些问题,但似乎有所解决:What is the effect of paging on jqgrid's getChangedCells method when using clientArray(clientside) for editing?