ComponentOne TabStrip for ASP.NET AJAX: TabStrip for ASP.NET AJAX Task-Based Help > Binding a C1TabStrip to a Data Source > Binding a C1TabStrip to an Access Data Source

Binding a C1TabStrip to an Access Data Source

In this topic, you will learn how to bind a C1TabStrip control to an Access data source. 

Complete the following steps:

1.   Create a new ASP.NET AJAX-Enabled Web Site in Visual Studio.

2.   In the Solution Explorer window, right-click on App_Data and choose Add Existing Item from the menu.

      The Add Existing Item dialog box appears.

3.   Navigate to the folder that contains the Control Explorer sample project (In Vista: C:\Users\<username>\Documents\ComponentOne Samples, In XP: C:\Documents and Settings\<username>\My Documents\ComponentOne Samples) and open the App_Data folder. Select tabdata.mdb from the list of files and click Add.

      The tabdata.mdb database has been added to your project. 

 

     

 

4.   Add a C1TabStrip control to your form.

5.   Click C1TabStrip's smart tag () to open the TabStrip Tasks menu. 

6.   In the C1TabStrip Tasks menu, select <New Data Source…> from the Choose Data Source drop-down box. 

7.   The Data Source Configuration Wizard appears.

8.   In the Data Source Configuration Wizard, complete the following steps:

9.   Select Access Database as your data source and then click OK.

10.  The Configure Data Source dialog box appears.

11.  In the Configure Data Source dialog box, complete the following:

a.   Click Browse to open the Select Microsoft Access Database dialog box. 

b.   Select the App_Data folder and then choose tabdata.mdb from the Contents of folder pane. 

c.    Click OK to return to the Configure Data Source dialog box and then click Next. 

d.   Select the radio button next to Specify columns from a table or view to activate the form.

 

 

e.   Click the Name drop-down arrow and select Links

f.    In the Columns pane, select the checkbox next to the asterisk (*).

 

 

g.   Click Next to move to the next step and then click Finish to close the dialog box. 

12.  Click C1TabStrip's smart tag () and select TabStrip Designer from the TabStrip Tasks menu.

 The TabStrip Designer Form dialog box opens.

13.  In properties pane, find MasterID and ParentID.  Set their properties to the following:

      Set the MasterID property to "ID".

      Set the ParentID property to "ParentID".

14.  Click OK and then run the program.

 This Topic Illustrates the Following:

The tab hierarchy of the C1TabStrip now reflects the information in the tabdata.mdb file. As you navigate through each tab, notice that your results resemble the following image:

 


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.