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

    In this step you will bind the products data table to the TileControl and fill the dataset.

    1. Select the C1TileControl and expand the Data node in the C1TileControl’s property window.
    2. Click on the dropdown arrow next to the DataSource property and expand Other Data Sources| Form1 List Instances and select c1NwindDataSet.
    3. Set the DataMember to Products.

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

    The TileControl is bound to the c1NwindDataSet, but is not automatically filled in. To fill the dataset, double click on the form and call the data adapter method in the Form1_Load like the following:

     

    Visual Basic
    Copy Code

    oleDataAdapter1.Fill(c1NWindDataSet)

    C#
    Copy Code

    oleDbDataAdapter1.Fill(c1NWindDataSet);

         

    When you run the project you will notice there is a tile for each product name in the product table, but the product name does not appear on each tile. In this case we will need to map the ProductName and Text to the C1TileControl.