This example shows how to bind the WPF Data Grid to different data sources. Refer to the following topic for more information: Bind to Data.
The example includes multiple solutions that demonstrate:
- How to bind the Data Grid to Entity Framework, EF Core, and XPO.
- Different binding mechanisms: virtual sources, server mode sources, and local data.
- MVVM and code-behind patterns.
See also: Implement CRUD Operations in a Data-Bound Grid
If you target .NET for your backend API, be sure to check out our free 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 and our XPO ORM library. You can use OAuth2, JWT or custom authentication strategies alongside tools like Postman or Swagger (OpenAPI) for API testing. Among its numerous capabilities, our built-in Web API Service 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.
If you build the .NET 5 app and then try to build the .NET Framework app, the following error occurs:
Your project does not reference '.NETFramework, Version = v4.7.2' framework. Add a reference to '.NETFramework,Version = v4.7.2' in the 'TargetFrameworks' property of your project file and then re-run NuGet restore.
To fix this issue, remove the obj folder from the app.
Entity Framework 6 ? | Entity Framework Core ? | DevExpress XPO ? | |
---|---|---|---|
Local Data ? | project, code, xaml | project, code, xaml | project, code, xaml |
Infinite Async Source ? | project, code, xaml | project, code, xaml | project, code, xaml |
Paged Async Source ? | project, code, xaml | project, code, xaml | project, code, xaml |
Instant Feedback Mode ? | project, code, xaml | project, code, xaml | project, code, xaml |
Server Mode ? | project, code, xaml | project, code, xaml | project, code, xaml |
Entity Framework 6 ? | Entity Framework Core ? | DevExpress XPO ? | |
---|---|---|---|
Local Data ? | project, code, xaml | project, code, xaml | project, code, xaml |
Infinite Async Source ? | project, code, xaml | project, code, xaml | project, code, xaml |
Paged Async Source ? | project, code, xaml | project, code, xaml | project, code, xaml |
Instant Feedback Mode ? | project, code, xaml | project, code, xaml | project, code, xaml |
Server Mode ? | project, code, xaml | project, code, xaml | project, code, xaml |
Entity Framework 6 ? | Entity Framework Core ? | DevExpress XPO ? | |
---|---|---|---|
Local Data ? | project, code, xaml | project, code, xaml | project, code, xaml |
Infinite Async Source ? | project, code, xaml | project, code, xaml | project, code, xaml |
Paged Async Source ? | project, code, xaml | project, code, xaml | project, code, xaml |
Instant Feedback Mode ? | project, code, xaml | project, code, xaml | project, code, xaml |
Server Mode ? | project, code, xaml | project, code, xaml | project, code, xaml |
Entity Framework 6 ? | Entity Framework Core ? | DevExpress XPO ? | |
---|---|---|---|
Local Data ? | project, code, xaml | project, code, xaml | project, code, xaml |
Infinite Async Source ? | project, code, xaml | project, code, xaml | project, code, xaml |
Paged Async Source ? | project, code, xaml | project, code, xaml | project, code, xaml |
Instant Feedback Mode ? | project, code, xaml | project, code, xaml | project, code, xaml |
Server Mode ? | project, code, xaml | project, code, xaml | project, code, xaml |
(you will be redirected to DevExpress.com to submit your response)