Dynamic Columns

Hello Team: 

I want to make dynamic columns (https://stackblitz.com/edit/angular-ninkrn-ytbway?file=default.component.ts), it works fine if the data is burned, but if I have the headers in the service response, it throws the following error




This is my code:

Html Code 



Javascript Code:

With the commented code, it works well, but with bringing the service data it does not work



Service Code:



And json: 


I appreciate your help



1 Reply 1 reply marked as answer

RS Rajapandiyan Settu Syncfusion Team June 3, 2020 02:42 PM UTC

Hi Cristian, 

Greetings from syncfusion support. 

Query : I want to make dynamic columns, it works fine if the data is burned, but if I have the headers in the service response, it throws the following error 

We have checked the provided sample and found that you have used old packages for EJ2 Grid 
 
 
 
So we suggest you to update the new packages of EJ2 Grid. please refer the below documentation to update the grid controls. 
 

Refer the below documentation which illustrates data binding in EJ2 Grid. 


if you still have the same problem, please get  back to us with the below details. 
  1. Which type of data binding you have used in grid? (local data/remote data/observables). Because you have used local data in the sample but observable data in the screenshot.
  2. Explain your requirement in more detail.
  3. Provided screenshot are in blur, so please share screenshot of the issue with clear visual.
  4. If possible share the issue reproduced sample with us.
 
Regards, 
Rajapandiyan S 


Marked as answer
Loader.
Up arrow icon