wpf-6090-controls-and-libraries-data-grid-bind-to-data-bind-to-local-data.md
This topic demonstrates how to bind the GridControl to a local database:
Connect your project to a local database.
Create a ViewModel template that implements ViewModelBase:
Build the solution to make the ViewModel class visible in the window’s Quick Actions.
Open the ThemedWindow‘s Quick Actions and define the window’s data context:
Open the GridControl‘s Quick Actions and invoke the Items Source Wizard.
Select the data source.
Run the project. The GridControl generates columns for all fields from a bound data source:
Note
For information on how to post changes to a database, refer to the following help topic: Post Changes to a Database.
View Example: WPF Data Grid - Getting Started .NET
The following example shows how to bind the WPF Data Grid to different data sources.
View Example: Bind the WPF Data Grid to Data
This example includes multiple solutions that demonstrate:
After you bind the Data Grid to a database, you can implement CRUD operations (create, read update, delete). Refer to the following topic for more information: CRUD Operations in a Data-Bound Grid.
View Example: Implement CRUD Operations in the WPF Data Grid
See Also
Lesson 1 - Add a GridControl to a Project and Bind it to Data