Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

174
Visualizações
Sending Current Cell Value in dataURL

Using jqGrid 4.15.6-pre - free jqGrid

In my colModel I am populating a cell with dataURL. I want to send the current cell value to the server with the URL. The following sends the parameter but the value(this.value) is undefined.

colModel:[
        {name:'id', index:'id', width:80, hidden: true, editable: true, editoptions:{ readonly:'readonly'}, editrules:{edithidden:true}, formoptions:{rowpos:1, colpos:1,label:"Index#:"}},
        {name:'crrstatus', index:'crrstatus', hidden: true, editable: true, editrules:{edithidden:true}, formoptions:{rowpos:2, colpos:1,label:"Current Queue:", elmsuffix: " "},
         edittype: "select",
            editoptions: { dataUrl: '/QMSWebApp/CustomerReturnRecordsControllerServletV8?lifecycle=customerReturnStatusOptionsLessInitialized&currentQueue='+this.value,
            selectFilled: function (options) {
                $(options.elem).select2({
                    dropdownCssClass: 'ui-widget ui-jqdialog zclassX2',
                    width: 300
                });
        }}},
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can not do it this way in jqGrid (suppose free-jqgrid too), since the this.value is set when the colModel is created and it is undefined to this time. In order to do what you want you will need to use a dataUrl as function and pass the value to it like this:

colModel:[
        {name:'id', index:'id', width:80, hidden: true, editable: true, editoptions:{ readonly:'readonly'}, editrules:{edithidden:true}, formoptions:{rowpos:1, colpos:1,label:"Index#:"}},
        {name:'crrstatus', index:'crrstatus', hidden: true, editable: true, editrules:{edithidden:true}, formoptions:{rowpos:2, colpos:1,label:"Current Queue:", elmsuffix: " "},
         edittype: "select",
            editoptions: { dataUrl: function ( rowId, value, name) {
                return '/QMSWebApp/CustomerReturnRecordsControllerServletV8?lifecycle=customerReturnStatusOptionsLessInitialized&currentQueue='+value,
            }
            selectFilled: function (options) {
                $(options.elem).select2({
                    dropdownCssClass: 'ui-widget ui-jqdialog zclassX2',
                    width: 300
                });
        }}},
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda