Your search did not match any results.

Data Grid - OData Service

To fetch data from an OData service, implement an ODataStore. Use its properties to specify the service's url, key data field, and OData version if it is different from 2.

You can configure ODataStore as a standalone element (see OData for details), but this demo assigns ODataStore settings to the store field of the DataSource configuration object. If you follow the same pattern in your application, make sure to set the store's type property to "odata".

Backend API
@(Html.DevExtreme().DataGrid() .ShowBorders(true) .DataSource(d => d.OData() .Version(2) .Url("https://js.devexpress.com/Demos/DevAV/odata/Products") .Key("Product_ID") ) .DataSourceOptions(d => d.Select(new[] { "Product_ID", "Product_Name", "Product_Cost", "Product_Sale_Price", "Product_Retail_Price", "Product_Current_Inventory" }) .Filter("['Product_Current_Inventory', '>' , 0]") ) .Columns(columns => { columns.Add() .DataField("Product_ID"); columns.Add() .DataField("Product_Name") .Width(250); columns.Add() .Caption("Cost") .DataField("Product_Cost") .DataType(GridColumnDataType.Number) .Format(Format.Currency); columns.Add() .DataField("Product_Sale_Price") .Caption("Sale Price") .DataType(GridColumnDataType.Number) .Format(Format.Currency); columns.Add() .DataField("Product_Retail_Price") .Caption("Retail Price") .DataType(GridColumnDataType.Number) .Format(Format.Currency); columns.Add() .DataField("Product_Current_Inventory") .Caption("Inventory"); }) )
using DevExtreme.NETCore.Demos.Models; using DevExtreme.NETCore.Demos.Models.DataGrid; using DevExtreme.NETCore.Demos.Models.SampleData; using Microsoft.AspNetCore.Mvc; using System.Linq; namespace DevExtreme.NETCore.Demos.Controllers { public class DataGridController : Controller { public ActionResult OdataService() { return View(); } } }

The DataSource configuration object allows you to sort, filter, group, and otherwise shape the store's data objects. This demo filters data and selects a limited number of fields.

A 1-Click Solution for CRUD Web API Services with Role-based Access Control via EF Core

If you target .NET for your backend API, be sure to check out Web API Service and register your free copy today. The Solution Wizard scaffolds an OData v4 Web API Service (.NET 6+) with integrated authorization & CRUD operations powered by EF Core ORM. You can use OAuth2, JWT or custom authentication strategies alongside tools like Postman or Swagger (OpenAPI) for API testing. The built-in Web API Service also filters out secured server data based on permissions granted to users. Advanced/enterprise functions include audit trail, endpoints to download reports, file attachments, check validation, obtain localized captions, etc.

To use the free Solution Wizard (which creates the Web API Service), run the Universal Component Installer from the DevExpress Download Manager and use our predefined template in Visual Studio 2022+.

Read Tutorial | View Examples: JavaScript (DevExtreme) & JavaScript (Svelte) | Watch Videos