how to retrieve values from a combocox

good morning, I would like to retrieve the values of a record from a comboxox. Not only value and text, but all the values of the datasource record expressing that combobox. i have tried with

args.itemData.(fieldname) but the result is undefined

all my test console.log return undefined 

attach code

Could you help me, please ? 


<ejs-combobox id='customer'
                #remote [dataSource]='customerData'
                [fields]='customerFields'
                (change)="customeronChange($event)"
                [autofill]='true'
                sortOrder='Ascending'
                width="350px">
</ejs-combobox>

  public customeronChange(args: any): void {
    this.customerObj?.dataBind();
    this.customerObj?.value;
    console.log(args);
   
console.log(args.itemData.Id)
console.log(args.itemData.id)

    console.log(args.itemdata.id)
    console.log(args.itemdata.Id)

    console.log(args.Itemdata.id)
    console.log(args.itemdata.Id)

    console.log(args.Name)
    console.log(args.name)


  }

console.log.args =
  1. itemData:
    1. abbreviation: null
    2. acquisitionDate: null
    3. address: null
    4. areaId: null
    5. areas: null
    6. assigneeId: null
    7. bancaRelazioneId: null
    8. bancaRelazioni: null
    9. bancaRiferimenti: null
    10. bancaRiferimentoId: null
    11. budgetCurrentYear: null
    12. budgetPreviousYear: null
    13. city: "Caiolo"
    14. clienteCentri: null
    15. clienteSedeId: null
    16. clienteSedi: null
    17. clientiCentroId: null
    18. clientiGruppoId: 1
    19. coordinateId: null
    20. coordinates: null
    21. country: null
    22. creationById: null
    23. creationDate: null
    24. customerSectorId: null
    25. customerSectores: null
    26. customerTypeId: null
    27. customerTypes: null
    28. description: ""
    29. divisaId: null
    30. divise: null
    31. email: ""
    32. firstName: null
    33. groupId: null
    34. groups: null
    35. homePage: ""
    36. id: 5
    37. lastName: null
    38. limiteCredito: null
    39. mobile: null
    40. modifiedById: null
    41. modifiedDate: null
    42. name: "So.Ge. Sondrio Gestioni"
    43. note: ""
    44. pagamentoCondizione: null
    45. pagamentoCondizioneId: null
    46. pec: ""
    47. phone: null
    48. postalCode: null
    49. prezzoGruppi: null
    50. prezzoGruppoId: null
    51. prezzoTipi: null
    52. prezzoTipoId: null
    53. provincia: "SO"
    54. region: "Lombardia"
    55. ribassoGruppi: null
    56. ribassoGruppoId: null
    57. salesCurrentYear: null
    58. salesPreviousYear: null
    59. scontoEntro1: null
    60. scontoEntro2: null
    61. title: "Spettabile"
    62. userId: null
    63. users: null
    64. valutaData: null




1 Reply

PK Priyanka Karthikeyan Syncfusion Team May 27, 2024 11:02 AM UTC

 

Hi Francesco Pruneri,

We have diligently worked on creating a simple sample based on the provided information and successfully retrieved all corresponding fields of the selected item in the select or change event. However, regrettably, we were unable to reproduce any issues in the latest version. Please find the sample for your reference.

To expedite the resolution process and provide you with the most accurate assistance, could you please consider modifying the shared sample to align it more closely with your specific scenario? Additionally, it would greatly assist us if you could provide detailed steps to replicate the issue on our end. 

Your cooperation in this matter is highly valued, and we are committed to ensuring a swift and effective resolution to any challenges you may be facing. Thank you for your time and collaboration.

 

Sample: https://stackblitz.com/edit/angular-tznwda-5r35fx?file=src%2Fapp.component.html,src%2Fapp.component.ts

 

 

Regards,

Priyanka K


Loader.
Up arrow icon