This is a migrated thread and some comments may be shown as answers.

How to use my own HttpService on Telerik DataSource

1 Answer 34 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Max
Top achievements
Rank 1
Max asked on 16 Jul 2018, 09:24 PM

Hi,

My company has its own HttpService (angular) that handles A LOT of application states. Something like: special API errors; oauth tokens; header-like pagination; and a requests queue with priorization too, ...

So I'm searching on the telerik solution if I can use my own HttpService to call the requests, but I can't find on docs any articles that tells me if I can do that.

I know that I can handle beforeRequest events, and I can add headers on "DataSource.transport.read" too. But like I said, I want telerik call my request method and pass as parameters the request data and I returns a Observable|Promise response. Is that possible?

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 18 Jul 2018, 11:46 AM
Hello Max,

The product and forum the question is about is set to Kendo UI for Angular 2+, but some of the specifics of the questions are Kendo UI for jQuery - specific (like DataSource, beforeRequest, DataSource.transport.read, etc.).

The Kendo UI for Angular suite does not have a dedicated DataSource object/component, and the data-bound widgets have Angular-specific binding mechanics via an Input property that can be a plain array (holding the data items), an object of type GridDataResult (for a pageable Grid for example), or an Observable that can be consumed in the template via the async pipe.

Further details are available in the following sections of our documentation:

https://www.telerik.com/kendo-angular-ui/components/grid/data-binding/

https://www.telerik.com/kendo-angular-ui/components/dropdowns/combobox/data-binding/ ... etc.

Binding the Grid to various backends via a custom data service is demonstrated in the following examples:

https://www.telerik.com/kendo-angular-ui/components/grid/advanced-features/hierarchy/

https://www.telerik.com/kendo-angular-ui/components/grid/data-binding/

https://www.telerik.com/kendo-angular-ui/components/grid/data-binding/automatic-operations/#toc-custom-directives

https://www.telerik.com/kendo-angular-ui/components/dataquery/mvc-integration/

Can you please specify whether the question is about the Kendo UI for jQuery Grid (with or without the Angular 1.x directives), or about the Kendo UI for Angular Grid (or other databound components like the DropDowns) so that I can switch it to the respective product if necessary?

Regards,
Dimiter Topalov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Max
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or