Remove grid from certain rows

Posted by: giantocr on 8 September 2017, 1:40 pm EST

  • Posted 8 September 2017, 1:40 pm EST

    I would like the first 12 rows on sheet 1 of FpSpread1 to not show the grid. I would like the rest of the rows to show the grid. How can I do this?



  • Replied 8 September 2017, 1:40 pm EST


    Gridlines can only be turned on or off at the sheet level.  This is the same as in  most other spreadsheet products, including Excel and OpenOffice.

    To achieve your desired look, you could try covering the gridlines in the first 12 rows with white cell borders.

        fpSpread1.Sheets[0].Rows[0, 11].Border = new ComplexBorder(null, null, new ComplexBorderSide(Color.White), new ComplexBorderSide(Color.White));

    As another option, you could try turning off gridlines and then using cell borders to mimic gridlines in rows after the first 12 rows.

        fpSpread1.Sheets[0].HorizontalGridLine = new GridLine(GridLineType.None);
        fpSpread1.Sheets[0].VerticalGridLine = new GridLine(GridLineType.None);
        fpSpread1.Sheets[0].Rows[12, 499].Border = new ComplexBorder(null, null, new ComplexBorderSide(Color.LightGray), new ComplexBorderSide(Color.LightGray));

  • Replied 8 September 2017, 1:40 pm EST

Need extra support?

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

Learn More

Forum Channels