Background Color of a Cell Span

Posted by: bdota on 8 September 2017, 2:55 pm EST

  • Posted 8 September 2017, 2:55 pm EST

    Hi,

     

    If I define a cell span,  How can I also change its background color?

     

    Thanks

  • Replied 8 September 2017, 2:55 pm EST

    solved.

    Looks like if I change the back color for one of the cells inside that cell span, it will apply it to the whole are.

    If there is a better way of doing it, please let me know.

     

    Thanks

  • Replied 8 September 2017, 2:55 pm EST

    BDotA,

    The background color of the upper left cell of the span is is used to paint the background of the whole span. For example, the following code creates a cell span with a light green background that covers cells A1:B2.

    SheetView sheet = fpSpread1.ActiveSheet;
    sheet.AddSpanCell(0, 0, 2, 2);
    sheet.Cells[0, 0].BackColor = Color.LightGreen;

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels