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.
-
Click Add. A C1.Win.C1Tile.PropertyMapping item will appear like the following.
-
Set the [*]->[None] member PropertyMapping.DataField to ProductID and PropertyMapping.TileProperty to Tag.
- Click Add and set the [*]->[None] [1] properties to the following:
-
-
PropertyMapping.Lookup.DataSource to dataSet11
-
PropertyMapping.Lookup.DisplayMember to Categories.CategoryName
-
PropertyMapping.Lookup.ValueMember to Categories.CategoryID
-
The CategoryID is a foreign key pointing to a category record in the Categories table. Here we create a lookup table which takes the CategoryID value in the Products record, and uses that value to navigate the relationship and return the more readable, category name.
-
PropertyMapping.TileProperty to Group
This will display the categories name for each group of tiles. For example, Beverages, Condiments, Dairy Products, etc.
-
Click Add and set the [*]->[None] [2] properties to the following:
-
PropertyMapping.DataField to ProductName
-
PropertyMapping.TileProperty to Text
-
This will display the product’s name on each tile. For example, Chai, Chang, etc.
-
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
-
This will assign the country name to each tile.
-
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
- Click Add and set the [*]->[None] [5] properties to the following:
- PropertyMapping.DataField to Discontinue.
The property mappings appear like the following in the members list: