Step 4 of 5: 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 page.

2.   Specify a binding for the DataGrid's ItemsSource property in XAML:

ItemsSource="{Binding [GetCategories], 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.