Your search did not match any results.
Data Grid

OData Service

Documentation
This example demonstrates how to configure the DataGrid widget to display remote data accessed using the OData protocol. Specify the data store type and remote data service URL, define data shaping options, and configure grid columns.
@(Html.DevExtreme().DataGrid() .DataSource(d => d.OData() .Url("https://js.devexpress.com/Demos/DevAV/odata/Products") .Key("Product_ID") ) .DataSourceOptions(d => d.Select(new string[] { "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.SampleData; using Microsoft.AspNetCore.Mvc; using System.Linq; namespace DevExtreme.NETCore.Demos.Controllers { public class DataGridController : Controller { public ActionResult ODataService() { return View(); } } }