Search code examples
odatadevexpressblazor

Has DevExtreme DxDataGrid support for OData in Blazor?


I'm trying to test this feature, I see in the documentation how to use OData in Razor, but not in Blazor. It's OData suported?


Solution

  • The DxDataGrid component is obsolete, so I decided to post a solution for the newest DxGrid component.

    We published a new step-by-step tutorial and runnable sample on GitHub: How to Create a Web API Service Backend for a Blazor WebAssembly Application with DevExpress Blazor Components. The backend uses EF Core for data access and is powered by the free DevExpress Web API Service for CRUD and authorization.

    The application works with blog post data. It authenticates a user with cookies, determines his or her permissions, and selectively enables the following data operations:

    • Lists existing Post records
    • Displays a photo of a Post author
    • Creates new Post records
    • Archives a Post record
    • Displays a report based on Post records

    To bind data from OData/Web API to the DxGrid component, our example implements a GridCustomDataSource descendant powered by Simple.OData.Client (MIT). We used this open source library instead of the standard Microsoft OData client library because the latter had a known issue (https://github.com/OData/odata.net/issues/1970), which prevented normal operation in Blazor WebAssembly at the time of testing.

    Search keywords: RBAC, Access Control, Authentication, Authorization, OData, Swagger, OpenAPI, Web API, ASP.NET Core, Blazor, WebAssembly, WASM, EF Core, EF, Entity Framework