Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

175
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda