wpf-7352-controls-and-libraries-data-grid-bind-to-data.md
Do the following to bind the Grid to data:
To post user changes to the data source, implement CRUD operations (create, read, update, delete). Refer to the following topic for more information: CRUD Operations in a Data-Bound Grid.
The MVVM Support section describes how to bind the Data Grid to a view model.
You can use the Items Source Wizard to bind the Grid to data. This wizard generates the data binding and CRUD code in XAML and code-behind.
The Items Source Wizard does not support ICollectionView and Microsoft Excel data sources.
The following topics describe how to bind the WPF Data Grid to specific data sources:
The Data Grid includes Server Mode and Instant Feedback Mode designed specifically for large data sources.
The following data sources support Server Mode and Instant Feedback Mode:
|
Data Access Technology
|
Server Mode Data Source
|
Instant Feedback UI Data Source
| | --- | --- | --- | |
Entity Framework 4+
|
|
| |
eXpress Persistent Objects
|
|
| |
OData v4
|
|
| |
WCF Data Services
|
|
| |
LINQ to SQL
|
|
| |
Parallel LINQ to Objects
|
|
|
Refer to the following topic for more information: Server Data and Large Data Sources.
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.
You can use Virtual Sources to implement server-side processing for the Data Grid.
Virtual sources are compatible with any data source that exposes an API to fetch portions of data consecutively. Supported data sources include REST Services, NoSQL Databases, Custom WCF Services, EntityFramework, or any other ORM. Virtual sources do not require a total item count, and sorting, filtering, and summary calculation operations are optional.
The following tutorial describes how to use the Items Source Wizard to implement a virtual source: Bind the WPF Data Grid to Virtual Sources.
If you need to implement a responsive user interface that is refreshed with real-time data, use the RealTimeSource component.
Run Demo: Real-Time Data Processing
The UnboundDataSource component is designed for binding scenarios when no strongly typed data set is available at compile time.
The GridControl supports a variety of techniques to bind to data that changes its structure at runtime. Refer to the following example for more information:
View Example: Bind GridControl to Dynamic Data
The following example illustrates how to bind the WPF Data Grid to different data source types:
View Example: Bind the WPF Data Grid to Data
This example includes multiple solutions that demonstrate:
View Example: Use UnboundDataSource to Populate WPF Data Grid with Data