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

Observable datasource is not working

Thread ID:

Created:

Updated:

Platform:

Replies:

147445 Sep 11,2019 06:00 AM UTC Sep 12,2019 01:03 PM UTC Angular - EJ 2 1
loading
Tags: TreeGrid
Sathyanarayanan Srinivasan
Asked On September 11, 2019 06:00 AM UTC

Hi,

I recently chanced upon SyncFusion and decided to try out a prototype with the syncfusion angular toolkit (components), for a client. If the exercise is promising, then their product will leverage syncfusion and would like to recommend their use commercially. As a beginner, I have a few queries which I hope can be answered by your good selves.

* How does the license work? Should any license key installation required to be part of the Angular project to enable the components? So far, I can see only npm open registry for component installations. Please clarify.

* I tried the treegrid as the first component. I managed to get the local datasource (as in <AngularType>[]). However, the dataSourceChanged event was not working for me to add/edit rows inline the grid, store in my backend using prorpietary typescript code (components + services combination). I then pored through your forums and somehow was indirected to async example. I followed the sample to the dot, but this time, the treegrid is not showing up with some errors printed on JS Console in Chrome browser.
> The first instance is below. I assume this is because of async and so the component troies to render data which doesnt exist yet (not fetched from DataService yet). However, this will not be acceptable for production behaviour. I would like to know what is wrong here and how to fix the same.
TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at DataManipulation.convertToFlatData (ej2-treegrid.es2015.js:1277)
    at ComponentBase.convertTreeData (ej2-treegrid.es2015.js:3533)
    at ComponentBase.render (ej2-treegrid.es2015.js:3498)
    at ComponentBase.appendTo (ej2-base.es2015.js:5183)
    at component-base.js:100
    at ZoneDelegate.invokeTask (zone-evergreen.js:391)
    at Object.onInvokeTask (core.js:39679)
    at ZoneDelegate.invokeTask (zone-evergreen.js:390)
    at Zone.runTask (zone-evergreen.js:168)

> The second instance is below. This is more serious, because this does not render the treegrid on the screen at all. I have followed the async example as close as possible, only difference is where and how data is (Observable) is returned. Since none of your code examples i have seen (relevant to this component) present module.ts, i am at a loss as what is missing to cause this error. Also, to note, there is a @Inject('sourceFiles') in your code examples which has been trivialized in your forums and recommended to be ignored. It is confusing to a newbie like me. 
TypeError: Cannot read property 'getService' of undefined
    at new Selection (ej2-grids.es2015.js:7580)
    at createInstance (ej2-base.es2015.js:13)
    at ModuleLoader.inject (ej2-base.es2015.js:2458)
    at Grid.injectModules (ej2-base.es2015.js:5277)
    at Grid.dataBind (ej2-base.es2015.js:5202)
    at ComponentBase.dataBind (ej2-treegrid.es2015.js:4319)
    at ZoneDelegate.invokeTask (zone-evergreen.js:391)
    at Object.onInvokeTask (core.js:39679)
    at ZoneDelegate.invokeTask (zone-evergreen.js:390)
    at Zone.runTask (zone-evergreen.js:168)

I am attaching my implementation of treegrid async example, hoping I can get some help.

Thanks and best regards,
Sathya

Attachment: asynctreegrid_ceb9b013.zip

Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On September 12, 2019 01:03 PM UTC

Hi Sathyanarayanan, 

Thanks for contacting Syncfusion Support. 

Query#1:- How does the license work? Should any license key installation required to be part of the Angular project to enable the components? So far, I can see only npm open registry for component installations. Please clarify.  

Yes anybody can download our npm package. However, to use our package legally they needed to get license from us by visiting syncfusion.com and signing up for license. This is also mentioned in our licensing document in npm package. Please find its content from GitHub link  
   
We don’t have any source level license validation, so you don’t have to do anything in your application for license validation. Our current license validation are fully based on support and new feature requests. 

Query#2,3:-   

We doesn’t have support for dataSourceChanged event in our Ej2 TreeGrid. We have implemented this feature in our upcoming main release  2019 Volume 3. Once implemented you can use this feature at your end. 

Till then we appreciate your patience. 

Regards, 
Farveen sulthana T 


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