Remove grid from certain rows

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

  • Posted 8 September 2017, 1:40 pm EST

    <P>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?</P>
  • Replied 8 September 2017, 1:40 pm EST

    <P>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.</P>
    <P>To achieve your desired look, you could try covering the gridlines in the first 12 rows with white cell borders.</P>
    <P>    fpSpread1.Sheets[0].Rows[0, 11].Border = new ComplexBorder(null, null, new ComplexBorderSide(Color.White), new ComplexBorderSide(Color.White));</P>
    <P>As another option, you could try turning off gridlines and then using cell borders to mimic gridlines in rows after the first 12 rows.</P>
    <P>    fpSpread1.Sheets[0].HorizontalGridLine = new GridLine(GridLineType.None);<BR>    fpSpread1.Sheets[0].VerticalGridLine = new GridLine(GridLineType.None);<BR>    fpSpread1.Sheets[0].Rows[12, 499].Border = new ComplexBorder(null, null, new ComplexBorderSide(Color.LightGray), new ComplexBorderSide(Color.LightGray));<BR></P>
  • 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