Back to forum

Pivot table updation on Dynamic Data

Resolved

Hi,
I am using Angular2+.
My data changes dynamically and I have given this data to WebDataRocks pivot table.
Now, the problem is that pivot table doesn’t take the data which changed dynamically. It only renders the data which is given to it on HTML page load.
Can you please help me on the same.
 
Regards,
Sumit Variya

5 answers

WebDataRocks Team WebDataRocks August 17, 2018

Hello, Sumit,
Thank you for posting to our forum.
We suggest using updateData API call each time your data changes. It can update the data inside the pivot table.
Hope it helps.
Regards,
WebDataRocks Team

variyasumit August 18, 2018

Hi,
Thanks a lot for your quick response.
I tried to implement updateData API call code given in the link in my Angular2+ (TypeScript) code but didn’t work.
Can you please provide me a sample code to implement updateData API call in Angular2+ (TypeScript).
 
Regards,
Sumit Variya

variyasumit August 20, 2018

Hi,
Can you please suggest me something on this?
 
Regards,
Sumit

WebDataRocks Team WebDataRocks August 20, 2018

Hello Sumit,
Thank you for your patience. Please note, that when you are going to use WebDataRocks API calls you need to be sure that the component is already loaded and it is ready to listen to your requests. In such case, we recommend using reportcomplete WebDataRocks event. Please find the example here: https://github.com/webdatarocksteam/pivot-angular/blob/master/src/app/app.component.ts. There is an example of how you can sign on the reportcomplete event when initializing component object: https://github.com/webdatarocksteam/pivot-angular/blob/master/src/app/app.component.html. Please note that you should care about signing on/off the events since in the other case it may cause the dead loop. The example of signing off the event you can find in app.component.ts file line 25. Also, you can sign on any WebDataRocks event using on() API call. Here is the example:

this.child.webDataRocks.on("reportcomplete", onReportComplete);

Please let us know if the information above was helpful for you.
Regards,
WebDataRocks Team

variyasumit August 21, 2018

Hi,
Yes, This information was very helpful. Your support is highly appreciated.
Now my Pivot table Data is getting updated dynamically with your solution.
Thanks a lot for the help. 🙂
 
Regards,
Sumit
 
 

Move up