Formatting effect of MatrixHeaderDescriptor and MatrixCellDescriptor

I am a bit confused about how the settings of MatrixHeaderDescriptor and MatrixCellDescriptor interacts to result in a formatting of a matrix.

Suppose I build a matrix like this:
1. Create MatrixHeaderDescriptor, add to Columns
2. Create MatrixHeaderDescriptor, add to Rows
3. Create MatrixCellDescriptor, add to Cells
4. Call BuildTemplate()
5. Changing the properties of matrix.Data.Rows[0], .Columns[0], .Cells[0] to override:
5.a. TemplateCell.Font, TemplateCell.HorizAlign (for MatrixDescriptor)
5.b. TemplateCell.Font, TemplateCell.HorizAlign, TemplateTotalCell.Font, TemplateTotalCell.HorizAlign (for MatrixHeaderDescriptor)
Obviously, since the Cells[0] is MatrixDescriptor, only two properties are set in that case.
6. I iterate over the cells in the matrix by using matrix[columnIndex, rowIndex] to set properties Font, HorzAlign

I can't figure out what the priorities and overrides are in the above. Does the template take precedence?
Or does the TemplateCell settings override template?
And finally, if I explicitly set cell properties after "BuildTemplate()", do these take the ultimate precedence over anything else?

There seems to be some kind of internal formatting flow going on here, just cannot understand how it works.

Thankful for advice.

Comments

  • edited November 2009
    Hello,

    You may change either the TemplateCell properties, or change the matrix cells by using matrix[columnIndex, rowIndex]. It is the same. TemplateCell is just a reference to a cell in the matrix.

    1) you create descriptors
    2) you call BuildTemplate()
    3) you change either the TemplateCell properties, or change the matrix cells directly by using matrix[columnIndex, rowIndex]

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.