Design Time Data Binding
This tutorial will show you how to bind RadDiagram from the Visual Studio design time surface, by only using the RadDiagram design-time support, and without writing any code. The tutorial uses a data base containing two tables illustrated below:
Follow the steps:
Open Visual Studio and start a new Windows Forms project. Open the form, created by the project.
Drag a RadDiagram from the toolbox to your form.
-
Select RadDiagram and open its ActionList (smart tag). In it, there is a DataSource property. Select the Add Project Data Source... link. This step will display the Data Source Configuration Wizard.
-
In the Data Source Configuration Wizard >> Choose a Data Source Type page, select the Database icon. Click the Next button.
-
In the Choose Your data Connection page click the New Connection... button. This step will display the Add Connection dialog.
-
Select the Microsoft Access Database File data source. After specifying the Database file name, click the OK button to close the Change Data Source dialog.
-
In the Choose Your Database Objects page, select the "Shapes" and "Connections" check-boxes. Click the Finish button to close the Data Source Configuration Wizard.
-
In the Smart tag >> DataSource drop down, select the "Shapes" table. This step will create DataSet, BindingSource and TableAdapter objects for the shapes table. Repeat the same step for the "Connections" table.
-
Select the generated DataSet for the DataSource property.
-
In the smart tag or in the properties window set the member properties in the following way.
-
Run the application