Redefining cell formatting styles

Jun 11, 2012 at 12:20 PM
Edited Jun 12, 2012 at 9:15 AM

Dear all,


I am trying to create tables with some predefined layout design, and later modify the contents of some its cells using the attributes of each paragraph. The problem seems to be that attributes are accumulative, that is, once a property has been established as true in a parent enclosure, it will not take the value instantiated in its cells. I will use an excerpt taken from the invoice generation example in the library:



            Table quote_table = t.InsertTableAfterSelf(data.Rows.Count + 1, data.Columns.Count);
            //Use a predefined TableDesign
            quote_table.Design = TableDesign.LightShading;

            Formatting normalText = new Formatting();
            normalText.Bold = false;
            for (int row = 1; row < quote_table.RowCount; row++)
                for (int cell = 0; cell < quote_table.Rows[row].Cells.Count; cell++)
                    Paragraph cell_paragraph = quote_table.Rows[row].Cells[cell].Paragraphs[0];
                    //Populate each row, and apply the new formatting
                    cell_paragraph.InsertText(data.Rows[row - 1].ItemArray[cell].ToString(),false , normalText);



My expectation is that in each row you will get a paragraph without bold text, but the output takes always the default values from TableDesign.LightShading. If I add additional properties to my formatting object (for instance, normalText.UnderlineColor = Color.Red;), they are added correctly.


Is there something that I am doing wrong?