Jqgrid Error saving data field via Datepicker

Asked

Viewed 204 times

1

I have a problem that when saving a field via datepicker, the same instead of sending the value, sends the same via input, this case is only in cases where the enter button is not pressed.

$(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}); 

});

Error image:

inserir a descrição da imagem aqui

Thank you.

  • could put the image here?

  • I have no reputation for it, but I posted the image in the post, follow the link http://s24.postimg.org/7zh3b4q9x/erri_Jqgrid.png

  • 1

    did not know of such restriction, I added to make it easier

  • All right, but I posted it up. Thank you.

1 answer

0


Well people, to perform the adjustment I changed the grid to cell editing and applied the cell settings to the function aftereditcell(), because when I was generating XML in the previous way the object was not yet finished and so it was created in input format.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.