【问题标题】:JqGrid Error on save field datepicker保存字段日期选择器上的 JqGrid 错误
【发布时间】:2014-02-11 10:22:54
【问题描述】:

当我没有按下按钮输入时保存字段日期选择器时遇到问题。

$(function () {

    jQuery("#grid").jqGrid({
        url:'odo_ctd0004b.asp',
        mtype: 'GET',
        ...
        datatype: "json",
        colNames:['Operadora', 'Nº Remessa', 'Ref. Anterior', 'Situação do Físico', 'Situação Remessa', 'Dt. Recebimento', 'Dt. Postagem', 'Qtd Guias', 'Val. Apresentado', 'COD_TS_NR', 'COD_OPERADORA'],
        colModel:[{name:'NOM_OPERADORA',                index:'NOM_OPERADORA'               , width:120, align:"left"},
                  {name:'NUM_GRD',                      index:'NUM_GRD'                     , width:100, align:"center"},
                  {name:'MES_ANO_REF_ANTERIOR',         index:'MES_ANO_REF_ANTERIOR'        , width:130, align:"center"},
                  {name:'NOME_SITUACAO_FISICO',         index:'NOME_SITUACAO_FISICO'        , width:180, align:"left"},
                  {name:'NOME_SITUACAO_REMESSA',        index:'NOME_SITUACAO_REMESSA'       , width:180, align:"left"},
                  {name:'DATA_RECEBIMENTO',             index:'DATA_RECEBIMENTO'            , width:150, align:"center", editable: true, sorttype:"date"},
                  {name:'DT_POSTAGEM',                  index:'DT_POSTAGEM'                 , width:150, align:"center", editable: true, sorttype:"date"},
                  {name:'QTD_CONTAS',                   index:'QTD_CONTAS'                  , width:100, align:"right"},
                  {name:'VAL_APRESENTADO',              index:'VAL_APRESENTADO'             , width:150, align:"right"},
                  {name:'COD_TS_NR',                    index:'COD_TS_NR'                   , hidden: true },
                  {name:'COD_OPERADORA',                index:'COD_OPERADORA'               , hidden: true }
                ],              

        onSelectRow: function(id, rowid){
            if(id && id!=lastsel){
                jQuery('#grid').jqGrid('saveRow',rowid); //Tem que estar saveRow senão retorna ao valor original
                jQuery('#grid').jqGrid('editRow',id,true,pickdates);
                lastsel=id;
            }           
        },
        ... 
        rowList: [50, 100, 150],            
        recordtext: "Vendo {0} - {1} de {2}",
        pager: jQuery('#pager'),
        cellsubmit: 'clientArray',
    }).navGrid('#pager',{edit:false,add:false,del:false}); 

});

查看错误:http://s24.postimg.org/7zh3b4q9x/erri_Jqgrid.png

谢谢

【问题讨论】:

    标签: jquery jquery-plugins jqgrid datepicker


    【解决方案1】:

    我会解决这个问题,包括编辑单元格后的操作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多