This example binds the DevExtreme DataGrid component to an OData v4 service. The ODataStore is configured to run server-side data operations including filtering, record selection, and sorting.
This example includes a pre-configured ASP.NET Core OData server (see ODataServer) that uses OData REST APIs to expose sample data. The server runs at http://localhost:5005 and creates the following endpoint: /odata/Products.
All framework projects share the same implementation:
- Create an ODataStore. Specify the service url, key data field, and OData version.
- You can configure a standalone ODataStore service (see OData for details), but this examples uses a DataSource to implement data filtering and selection operations.
- Bind the DataGrid to the data source.
-
Start the OData Server Execute the following command to start the OData server:
cd ODataServer dotnet runThe server is available at the following URL:
http://localhost:5005. -
Run the Client Application Execute one of the following commands to run the client application:
- Angular:
cd Angular && npm install && npm start - React:
cd React && npm install && npm run dev - Vue:
cd Vue && npm install && npm run dev - jQuery:
cd jQuery && npm install && npm start
- Angular:
Our ASP.NET Core example includes a standalone OData server. Run the following command to start the client application and server:
cd "ASP.NET Core"
dotnet runThe application is available at the following URL: http://localhost:59183 .
-
OData Server
- Program.cs - OData service configuration
- ProductsController.cs - OData controller
- Product.cs - Product entity model
-
Angular
-
React
-
Vue
-
jQuery
-
ASP.NET Core
(you will be redirected to DevExpress.com to submit your response)