Back to Devexpress

Lesson 1 - Add a GridControl to a Project and Bind it to Data

wpf-96441-controls-and-libraries-data-grid-getting-started-code-lesson-1-add-a-gridcontrol-to-a-project.md

latest2.2 KB
Original Source

Lesson 1 - Add a GridControl to a Project and Bind it to Data

  • Jun 06, 2023
  • 2 minutes to read

This tutorial demonstrates how to add a GridControl to your project and bind the control to a database:

Tip

The following tutorials demonstrate how to bind the GridControl to different data sources:

  1. Download the following blank sample project with a pre-configured database connection:

  2. Create a View Model that implements ViewModelBase:

  3. Add the GridControl to the project:

  4. Specify the DataControlBase.ItemsSource property to bind the GridControl to data:

  5. Run the project. The GridControl generates columns for all fields from the bound data source:

See Also

Lesson 2 - Configure Columns and Editors

Lesson 3 - Post Changes to a Database

Lesson 4 - Sort, Group, Filter Data

Lesson 5 - Display Summaries

WPF Data Grid: Bind to Data

Design-Time Features