DataSource for Entity Framework in WPF
WPF Quick Start / Step 3 of 4: Adding a Grid
In This Topic
    Step 3 of 4: Adding a Grid
    In This Topic

     

    In this step you will add a grid that will be used to display the data in the Categories table of the Northwind database. You can use C1FlexGrid or any grid you are familiar with, but in this example, we'll use a DataGrid control.

    1. Drag a DataGrid control from the Toolbox onto your window.
    2. Specify a binding for the DataGrid's ItemsSource property in XAML:

    ItemsSource="{Binding [Categories], ElementName=c1DataSource1}"

    1. Set the DataGrid's AutoGenerateColumns property to True; otherwise, the grid will not have any columns at run time.

    Now simply run the project to view the grid!