# Binding to a Data Source

This tutorial shows how to bind **RadToolBar** to an **AccessDataSource**:

1. Locate the file "Chart.mdb" file that appears in the **Live Demos/App_Data** folder of your **RadControls** installation. Drag this file to the **App_Data** folder in the Solution Explorer for your project:

   > caption

   ![toolbar chartmdb](https://www.telerik.com/products/aspnet-ajax/documentation/assets/acaa0326f7d8d3b55cd20df6bd8b242e/toolbar_chartmdb.png)

2. Drag a **RadToolBar** component from the toolbox onto your Web page. The **RadToolBar** [Smart Tag](https://www.telerik.com/products/aspnet-ajax/documentation/controls/toolbar/design-time/smart-tag) should appear automatically:

   > caption

   ![toolbar smarttag](https://www.telerik.com/products/aspnet-ajax/documentation/assets/c4cb2983d4fe7dd20be33bdb59fb5e6d/toolbar_smarttag.png)

3. In the **RadToolBar** Smart Tag, use the **Skin** drop-down to change the [skin](https://www.telerik.com/products/aspnet-ajax/documentation/controls/toolbar/appearance-and-styling/skins) for the **RadToolBar** to "Hay":

   > caption

   ![toolbar chooseskin](https://www.telerik.com/products/aspnet-ajax/documentation/assets/6110041363dac08d4cbb5e3d3bcbc7ac/toolbar_chooseskin.png)

4. Still in the Smart Tag, open the **Choose Data Source** drop-down and select **New Data Source**.

   > caption

   ![toolbar newdatasource](https://www.telerik.com/products/aspnet-ajax/documentation/assets/605a0f2854c1f7c47abd3318d8162f5d/toolbar_newdatasource.png)

5. The Data Source Configuration Wizard appears. In the Select a DataSource Type screen, specify an **AccessDataSource** and click **OK.**

   > caption

   ![Data Source Configuration Wizard](https://www.telerik.com/products/aspnet-ajax/documentation/assets/32721216784c31048511b6d4894dfd28/toolbar_chooseadatasourcetype.png)

6. In the **Choose a Database** screen, click the **Browse** button, and select the "Chart.mdb" file. Then choose **Next** to continue:

   > caption

   ![Configure Data Source](https://www.telerik.com/products/aspnet-ajax/documentation/assets/fe56aaff688c29e590caab55b79b291a/toolbar_chooseadatabase.png)

7. In the **Configure the Select Statement** screen, choose **Specify columns from a table or view**. Select the "Subcategory" table from the **Name** drop down, and select the "Id", "Name", and "Category_id" fields:

   > caption

   ![Configure Data Source](https://www.telerik.com/products/aspnet-ajax/documentation/assets/c60d88e0f330ef0ed0f551cad7d824b3/toolbar_configureselect.png)

8. Click the **WHERE** button to add a where clause to your query. In the Add WHERE Clause screen, set the **Column** to "Category_Id", the **Operator** to "=", the **Source** to "None", and set the parameter value to "1":

   > caption

   ![Add Where Clause](https://www.telerik.com/products/aspnet-ajax/documentation/assets/21d839fabb34e4b5bdd497c3eaac3df6/toolbar_addwhereclause.png)

9. Click the **Add** button to add the WHERE clause, and then click OK.

10. Back in the Configure The Select Statement page, click Next to accept the select statement.

11. Click the Test Query button to see the data from the data source. Then choose Finish to exit the Wizard:

    > caption

    ![ToolBar Test Query](https://www.telerik.com/products/aspnet-ajax/documentation/assets/48a2811276206490fd521efbd6215b07/toolbar_testquery.png)

12. In the Properties pane for the **RadToolBar** component:

13. Set the **DataTextField** property to "Name".

14. Set the **DataValueField** property to "Id".

    > caption

    ![toolbar datafieldproperties](https://www.telerik.com/products/aspnet-ajax/documentation/assets/4f2bbcefb563b01953b9eb450c59249e/toolbar_datafieldproperties.png)

15. Run the application. Note that the tabs are labelled using the "Name" field of the data source:

    > caption

    ![Bound ToolBar](https://www.telerik.com/products/aspnet-ajax/documentation/assets/c4051abfdc70734d9dc9b8053979a532/toolbar_boundtoolbar.png)

## See Also

* [Overview](https://www.telerik.com/products/aspnet-ajax/documentation/controls/toolbar/data-binding/overview)

* [Overview](https://www.telerik.com/products/aspnet-ajax/documentation/controls/toolbar/getting-started/overview)
