ComponentOne TileControl for WinForms
Data Binding Overview / Databinding Tutorial - Creating a Complex Databound TileControl / Step 5 of 8: Binding the Products Table to C1TileControl
In This Topic
    Step 5 of 8: Binding the Products Table to C1TileControl
    In This Topic

    In this step you will bind the products data table to the TileControl and fill in the datasets for the products, suppliers, and categories.

    Set the TileControl’s Data Properties

    1. Select the C1TileControl and expand the Data node in the C1TileControl’s property window.
    2. Set the C1TileControl.DataSource property to dataSet11. You will need to expand the Other Data Source node.
    3. Set the DataMember to Products.

    Setting these two properties binds the products data table in the dataSet11 to the TileControl.

    Populating the TileControl

    The TileControl is bound to the dataSet11, but is not automatically filled in. To fill the dataset, call the data adapter method like the following:

    Visual Basic
    Copy Code

    categoriesDataAdapter.Fill(dataSet11)

    suppliersDataAdapter.Fill(dataSet11)

    productsDataAdapter.Fill(dataSet11)

     

    C#
    Copy Code

    categoriesDataAdapter.Fill(dataSet11);

    suppliersDataAdapter.Fill(dataSet11);

    productsDataAdapter.Fill(dataSet11);