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. Image for the cookie policy date

Treegrid - remote data initial load not working

Hi Syncfusion team,
I tried to use remote binding with odata for treegrid but the loading or add button does not trigger any request.
My DataManager is:
this.concreteTrackerDataODataV4Adapter = new InterceptorODataV4Adaptor(token);
                return new DataManager({
                    url: url
                    crossDomain: true,
                    adaptor: this.concreteTrackerDataODataV4Adapter,
                    offline: false,
                }, new Query().requiresCount());

And my html is:
<ejs-treegrid #taskListTreeGrid [dataSource]='concreteTrackerTasksDataManager' idMapping='id' parentIdMapping='idParent' 
    [editSettings]='editSettings' loadChildOnDemand='true' [allowPaging]='true' [pageSettings]='pageSettings' enableLoadOnDemand='true' (expanding)='Begin($event)'
    hasChildMapping='isParent' [treeColumnIndex]='1' [toolbar]='toolbarOptions' [query]='concreteTrackerTasksDataManager.defaultQuery'>
        <e-column field='id' headerText='Task ID' textAlign='Right' width=70></e-column>
        <e-column field='title' headerText='Task Name' textAlign='Left' width=200></e-column>
        <e-column field='projectName' headerText='Task Name' textAlign='Left' width=200></e-column>

I tried to debug to the treegrid code and it seems the grid does not recognize the datamanager is remote in triggerthis.grid.dataBound = function (args) {...}, function "isRemoteData"

As you can see in below image, the instanceof DataManager does not work.

Could you please help?

1 Reply

PK Padmavathy Kamalanathan Syncfusion Team December 24, 2019 03:27 AM UTC

Hi Ricardo,

Thanks for contacting Syncfusion Forums.

QUERY:  Remote Data Binding with OData not working 

From your query we understand that you are unable to bind datasource to treegrid with remote data binding. You have mentioned "concreteTrackerDataODataV4Adaptor" and "InterceptorODataV4Adaptor" class. We suspect that you have not binded your data manager to the treegrid anywhere (we can see that from your code). Also you haven't provided the details about the class InterceptorODataV4Adaptor.

Please provide the below details so that we could validate further,
1) Please provide complete treegrid rendering code
2) Datamanager related code (all the code zipped)
3) Version Details

If you have further queries, please get back to us.

Padmavathy Kamalanathan

Live Chat Icon For mobile
Up arrow icon