DataManager with custom datasource

Hi there,

I just started evaluateing the Grid componente for my exiting Angular 5 app.

For all my backend services I have allready custom data service components implemented. I don't want that the grid to going to issue any request (via the DataManager) to my backend service.

What I basically need is an interface/callbacks that the grid is going to use to request data or to perform crud operations. So that I can create the need request parameters and perform the operation myself.

For testing I implemented the AdaptorOptions interface, but it looks like that the callee of that interface is going to issue the request. Also the AdaptorOptions interface is not well documented, all functions are of type "Function". So I have no idea which parameters are get passed into these functions and what the expected return value should be.

Can you please help here to be able to uses my existing data service components within the Grid?

Kind regards,
Sörnt Poppe


5 Replies

RU Ramdhas  Ueikattan Syncfusion Team December 13, 2017 12:57 PM UTC

Hi Poppe, 

Thanks for your interest in Syncfusion Products. 

We have validated your requirement and you can assign data for grid from the external service by using the “dataSource” property. We have created a sample based on your requirements. Please refer the below plunker sample link 



Query2: The AdaptorOptions interface is not well documented, all functions are of type "Function". 

We have considered your suggestion and we will improve our documentation. 
 

Please let us know, if you have any queries. 

Regards, 
Ramdhas  Ueikattan. 



SP Sörnt Poppe December 28, 2017 02:57 PM UTC

Hi Ueikattan,

thank you very much for your example!

I have one more issue with the grid:
My data service supports paging, to only get the elements which should be displayed within the current page.

I configured the grid.pageSettings property like this:
pageSettings = {
      currentPage: 1,
      pageSize: 2,
      pageSizes: [2, 10, 20, 50]
    };

In my example, I have a total of 4 elements. When requesting the first page the service returns the first 2 elements and also a totalItems number of 4.

After I got back the search result, I update the pageSettings.totalRecordsCount to 4. But it looks like that the grid page renderer doesn't take that into account. I attached a screen shoot.

I expected that the pager displays 2 pages (at the bottom left) and also updates "1 of 1 pages (2 items)" to "1 of 2 pages (4 items)" (at the bottom right).

Can you please tell me what I need to do here?

Kind regards,
Sörnt Poppe




Attachment: CurrentState_292ca4db.zip


PS Pavithra Subramaniyam Syncfusion Team January 2, 2018 12:56 PM UTC

Hi Sörnt, 

We have already logged this feature request  “Support for Custom service with Grid” in our feature list. This feature will be included in any of our upcoming release.   
 
Regards, 
Pavithra S. 



SP Sörnt Poppe January 2, 2018 01:03 PM UTC

Hi Pavithra,

thank you for your response. Is that feature list some where public viewable, so that I can track that feature?

Kind regards,
Sörnt Poppe



PS Pavithra Subramaniyam Syncfusion Team January 4, 2018 11:19 AM UTC

Hi Sörnt, 
We have created a support incident under your account. Please log on to our support website to check for better follow up on further updates. 
Please let me know if you have any questions. 
Regards, 
Pavithra S. 


Loader.
Up arrow icon