We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Using dynamic data

Thread ID:

Created:

Updated:

Platform:

Replies:

147639 Sep 18,2019 11:52 AM UTC Sep 30,2019 10:41 AM UTC Angular - EJ 2 3
loading
Tags: Treeview
Horváth
Asked On September 18, 2019 11:53 AM UTC

Dear support,

I have a component what loads data from a database using a service and then gives that data to the tree view component. When i check a node the service updates the checked state in the database. I have a refresh button on the component what is used to download the latest states from the database ( this function loads the data on the first start too. ). When i check a parent node then it update the database but when I download it with the refresh button and gives it to the data source property then it appears wrong.

This is how it looks like when i check the 'Alagsor' node:
 
And this is how it looks like when i reload it from the api:



When i start my component I make a subscription to rendelok$ observable and when i get data from it i give it to the dateSource property of the treeview component



Thanks in advance,
David

Ashokkumar Balasubramanian [Syncfusion]
Replied On September 23, 2019 04:32 AM UTC

Hi David, 
 
Good day to you. 
 
We have validated the reported issue and tried to reproduce the issue at our end. But unfortunately, we could not able to replicate the issue.  
 
 
In the above sample we have rebind the same datasource once the user checks a node and click on the refresh button. 
 
If you are still facing the issue with the getting updated datasource after checking the node, we need more information to proceed further on this and provide you a solution as early as possible. 
 
a.     Whether you are using any adaptor to fetch the data from the remote end 
b.     Share the sample which you tried from your side 
c.      If possible, kindly reproduce the problem with the above-attached sample and share it with us. 
 
Kindly share the above-asked information if the issue persists. It would be more helpful to assist you better. 
 
Regards, 
Ashokkumar B. 


Horváth
Replied On September 27, 2019 12:46 PM UTC

Hi!

Sorry for the late response!

I managed to reproduce my problem based on Your example: https://stackblitz.com/edit/angular-tejvuu-zcafa8

When the component starts, it downloads the data via subscribing to the fakeApiService.dataFromApi subject. If we push the refresh button it downloads the data again and load it into the datasource.

Steps to reproduce the problem: 
  1.      for example uncheck "KEK telephely 01" > "Épület A"
  2.      then click the refresh button
the result should look like this: 
but it look like this: 


Thanks in advance, 
David

Ashokkumar Balasubramanian [Syncfusion]
Replied On September 30, 2019 10:41 AM UTC

Hi Horváth, 
 
We have validated the reported issue and the reported issue has been already resolved in our latest beta version. We suggest you upgrade the ej2-angular-navigations-packages to the latest 17.3.9-beta version to overcome the reported issue.  
 
 
Note: In the above sample, we have used the getTreeData method of the TreeView component to get the updated data source. However, you can replace this data with the latest data from your database. 
 
Kindly check the above sample and let us know if you need any further assistance. 
 
Regards, 
Ashokkumar B. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon