ComponentOne TileControl for WinForms
Data Binding Overview / Databinding Tutorial - Creating a Complex Databound TileControl / Step 6 of 8: Setting C1TileControl's Property Mappings
In This Topic
    Step 6 of 8: Setting C1TileControl's Property Mappings
    In This Topic

    In this step you will add the property mappings to the PropertyMapping class using the C1TileControl.PropertyMappings collection editor at design time.

    Select the C1TileControl on the form. In the C1TileControl’s Properties window click on the ellipsis button next to the PropertyMappings property. The C1TileControl.PropertyMappings Collection Editor appears.

    1. Click Add. A C1.Win.C1Tile.PropertyMapping item will appear like the following.

    1. Set the [*]->[None] member PropertyMapping.DataField to ProductID and PropertyMapping.TileProperty to Tag.
    2. Click Add and set the [*]->[None] [1] properties to the following:

    This will display the categories name for each group of tiles. For example, Beverages, Condiments, Dairy Products, etc.

    1. Click Add and set the [*]->[None] [2] properties to the following:
    2. PropertyMapping.DataField to ProductName
    3. PropertyMapping.TileProperty to Text
    4. This will display the product’s name on each tile. For example, Chai, Chang, etc.
    5. Click Add and set the [*]->[None] [3] properties to the following:
      • PropertyMapping.DataField to SupplierID
      • PropertyMapping.Lookup.DataSource to dataSet11
      • PropertyMapping.Lookup.DisplayMember to Suppliers.Country
      • PropertyMapping.Lookup.ValueMember to Suppliers.SupplierID
      • PropertyMapping.TileProperty to Text1
    6. This will assign the country name to each tile.
    7. Click Add and set the [*]->[None] [4] properties to the following:
    • PropertyMapping.DataField
    • PropertyMapping.Lookup.DataSource to dataSet11
    • PropertyMapping.Lookup.DataMember to Suppliers.Country
    • PropertyMapping.Lookup.ValueMember to Suppliers.SupplierID
    • PropertyMapping.TileProperty to IntValue

     

    1. Click Add and set the [*]->[None] [5] properties to the following:
    2. PropertyMapping.DataField to Discontinue.
    • PropertyMapping.TileProperty to BackColor.

    The property mappings appear like the following in the members list: