Step 3 of 4: Adding a Grid

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}"

3.   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!


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.