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

Databinding against OData V4 Web Api

1 Answer 418 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ralf
Top achievements
Rank 1
Ralf asked on 26 Mar 2020, 03:09 PM

Hello,

i want to consume an OData V4 Web Service and show the data in a Kendo UI Grid.

Ist there any example how to do this?

The OData response format is a little bit different from standard json response.

Thanks in advance

Ralf

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 30 Mar 2020, 11:09 AM

Hi Ralf,

In general, all Kendo UI for Angular components are simply representational once and they can function with any back-end as long as the data passed to them is in a supported format. Here you can find all supported formats and an example that uses an OData service (check the northwind.service.ts file):

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

The examples that communicate with a sample OData backend also utilize the Data Query toODataString helper function that transforms the incoming Grid state to an OData4-compatible string.

https://stackblitz.com/edit/angular-jegera?file=app/app.component.ts

The Kendo UI for Angular Grid is agnostic of where its data comes from, and relies on emitting events containing the necessary information for processing the data (or performing a remote HTTP request):

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

You can either create a data service that will receive the Grid state and will handle the remote HTTP requests and response (that will be eventually consumed by the Grid) or create a custom auto binding directive that will abstract away all data-related operations, e.g. Please check the following article for step by step guidance:

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

I hope this helps.

Regards,
Martin
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Grid
Asked by
Ralf
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or