ComponentOne TileControl for WinForms
Data Binding Overview / Property Mapping
In This Topic
    Property Mapping
    In This Topic

    The C1.Win.C1Tile.Tile component uses the PropertyMapping class to create an association between the property of an item from the data source and the property of the corresponding C1.Win.C1Tile.Tile component.

    The PropertyMapping class includes the following members:

     

    Property Description

    PropertyMapping.Comment

    Specifies the comment for the PropertyMapping object.

    PropertyMapping.DataField

    The field of the data source which is mapped to the tile property.

    PropertyMapping.DataSource

    Specifies the gap between tile cells in a group.

    PropertyMapping.Lookup Encapsulates the lookup properties.
    PropertyMapping.TileControl Gets the owner of the C1.Win.C1Tile.C1TileControl.
    PropertyMapping.TileProperty Gets or sets the property of the C1.Win.C1Tile.Tile object that is a destination for mapping.

    The PropertyMapping.TileProperty can be set to any of the TileProperty enumeration values.

    C1TileControl uses the MappingLookup class to display information from one table based on the value of a foreign-key field in another table.

    For example, consider a table of Products in a sales database. Each record in the Products table includes a CategoryID indicating which category the product belongs to. The CategoryID is a foreign key pointing to a category record in the Categories table. When presenting a list of Products (from the Products table) you may want to display the actual categories name for each product, as opposed to the ProductsID. Since the categories name is in the categories table, and you are presenting data from the Products table, you need to create a lookup table or MappingLookup class which takes the CategoryID value in the Products record, and uses that value to navigate the relationship and return the more readable, category name. This concept is known as a lookup table. For an example of creating a lookup table see Adding Property Mappings to C1TileControl.

    The MappingLookup class includes the following members:

     

    Property Description

    MappingLookup.DataSource

    Gets or sets the data source object for the lookup.

    MappingLookup.DisplayMember

    The field of the data source which is mapped to the tile property.

    MappingLookup.ValueMember

    Gets or sets the field to use as the source of value (primary key) matching the foreign key in the C1.Win.C1Tile.PropertyMapping.DataField.

    The PropertyMapping.TileProperty can be set to any of the TileProperty enumeration values.