Author Topic: Select display two data  (Read 847 times)

evillalobosos

  • Newbie
  • *
  • Posts: 6
    • View Profile
Select display two data
« on: September 27, 2022, 11:21:31 pm »
hi mens i need your help for next detail

in the grid i have one select in show one list of material,  ;D in this case need to show only name of material


i´m use json create in php for show list with next code

create: function (evt, ui) {
                this.widget().pqTooltip(),
               
               grid = this;
                   var  column;
                //fetch options for ShipCountry column from server.
                $.getJSON("../Configuracion/clases/Cl_Prod_Materiales.php", function (response) {
                                 
                  column = grid.getColumn({ dataIndx: 'Material' });
                    column.editor.options = response;

                });   
            }

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Select display two data
« Reply #1 on: October 04, 2022, 02:16:29 pm »
response from remote script should be in this format:

https://paramquery.com/Content/ShipVia.json

Example of usage: https://paramquery.com/pro/demos/edit_select ( Ship Via column )

evillalobosos

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Select display two data
« Reply #2 on: October 04, 2022, 09:04:08 pm »
this is my array of return my php

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Select display two data
« Reply #3 on: October 26, 2022, 05:26:05 pm »
Hopefully you might have solved it by now, if not then sorry for late reply.

You have to mention valueIndx and labelIndx in column.editor

Code: [Select]
editor: {
  valueIndx: "ID_MATERIAL"
  labelIndx: "MATERIAL"
}

API Documentation: https://paramquery.com/pro/API#option-column-editor

Please let me know if you need further assistance.