TreeGrid - Observable not working in Angular 13

Hello,

I'm trying to implement treegrid with Observable data, but I can't, it just shows spinner and "No records". I think it's a version of Angular, but I don't know where the bug is, I don't have any bug messages in the console. I use Angular 13.1 and treegrid 20.1.

I downloaded a sample from the github on Angular 7 and it works for me.


I created a sample application in attachment.


Thank you


Attachment: treeGridSample_736c7c25.zip

2 Replies

PS Pon Selva Jeganathan Syncfusion Team May 27, 2022 03:21 PM UTC

Hi Lukas,   


Thanks for contacting syncfusion forum.


Query: Observable not working in Angular 13


We are working on this query with high priority. And we will update with further details by  31st May 2022. Until then we value your patience.


Regards, 

Pon selva  



PS Pon Selva Jeganathan Syncfusion Team May 31, 2022 03:37 PM UTC

Hi Lukas,   


Thanks for your patience.


Query: Observable not working in Angular 13


We are able to reproduce the issue at our end in your shared sample. In your shared sample you are incorrectly binding the data, so this issue occurred. And we checked your shared sample with Angular 7 and  treegrid with 20.1.56 version. We are facing same issue as you mentioned.


While using the custom binding feature you need to handle handled and defined child data separately and use used in custom logic.


Using the custom binding feature you can bind the child data for a parent record as per your custom logic. When a parent record is expanded, dataStateChange event is triggered in which you can assign your custom data to the childData property of the dataStateChange event arguments.  While using the observable binding you need to define the idMapping, parentIdMapping and hasChildMapping properties


Please refer to the below modified sample,

https://www.syncfusion.com/downloads/support/directtrac/general/ze/treeGridSample_71295465413


Please refer to the below screenshot,



Please refer to the below help documentation,

https://ej2.syncfusion.com/angular/documentation/treegrid/observables/#observable-binding-using-async-pipe


If you are facing any issue while following the above reference, kindly share the working example using Angular 7, kindly share the details of data binding (whether you are using the selfreferential or observable binding) details, and share the stacktrace details (if any), which is helpful to proceed further.


Kindly get back to us for further assistance.


Regards, 

Pon selva  



Loader.
Up arrow icon