Spread ASP.NET 15
Spread for ASP.NET 15 Product Documentation / Developer's Guide / Understanding the Product / Concepts Overview / Object Parentage
In This Topic
    Object Parentage
    In This Topic

    For the objects in a Spread component, such as the sheet, column, and cell, there are formatting and other properties that each object inherits from what is called its "parent." A cell may inherit some formatting, for example the background color, from the sheet. If you set the alignment of text for all the cells in a column, the cell inherits that as well. Because of this object parentage, many properties and methods can be applied in different ways to different parts of a spreadsheet.

    Of course, you can override the formatting that an individual cell inherits. But by default, objects inherit properties from their parents. So in a given context, the settings of any object are the composite of the settings of its parents that are being applied to that object. For example, you may set the text color for a cell at the cell level, but it may inherit the vertical alignment from the row and the border from its column, and the background color from the sheet. Since the background color may be set at several of these levels, certain rules of precedence must apply.

    The closer to the cell level, the higher the precedence. So if you set the background color of the cell, the settings inherited from the parents are overridden. Refer to the list to see the order of precedence of these properties. The closer to the cell (the lower the number) the higher the precedence.

    1. Cell
    2. Row
    3. Column
    4. Alternating Row
    5. Sheet
    6. component

    For more information on the setting of properties of an object and how to use the Parent property of an object, refer to Customizing the Appearance. For information on cell types, which is set in a different way than inheriting from a parent, refer to Customizing with Cell Types.