change the gridlines color

Posted by: suvi on 8 September 2017, 1:15 pm EST

  • Posted 8 September 2017, 1:15 pm EST

    Hello


    I want to change the grid lines color of active sheet to green. Please let me know how to achieve this.


    I am using Spread for Windows Forms v25 for Visual Studio 2005.


    Regards


    Suvi


     

  • Replied 8 September 2017, 1:15 pm EST

    Suvi,


    There is a HorizontalGridLine and VerticalGridLine property you can set a new GridLine object into.

     <PRE class=coloredcode> FpSpread1.Sheets(0).HorizontalGridLine = <SPAN class=kwd>New</SPAN> FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Flat, Color.Green)
    FpSpread1.Sheets(0).VerticalGridLine = <SPAN class=kwd>New</SPAN> FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Flat, Color.Green)
    </PRE> 
  • Replied 8 September 2017, 1:15 pm EST

    Hi Scott,


    Could you please tell me how to change the background color of the sheet.


    In my sheet when there is no data, i want the backcolor to be control instead of default blue.


    I tried using skin and setting the greyareabackcolor

    <FONT size=2>

    FarPoint.Win.Spread.</FONT><FONT color=#008080 size=2>SheetSkin</FONT><FONT size=2> skin = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> FarPoint.Win.Spread.</FONT><FONT color=#008080 size=2>SheetSkin</FONT><FONT size=2>(</FONT><FONT color=#800000 size=2>"TestSkin"</FONT><FONT size=2>, System.Drawing.</FONT><FONT color=#008080 size=2>SystemColors</FONT><FONT size=2>.Control, </FONT><FONT color=#008080 size=2>Color</FONT><FONT size=2>.DarkGray, </FONT><FONT color=#008080 size=2>Color</FONT><FONT size=2>.Black,</FONT><FONT color=#008080 size=2>Color</FONT><FONT size=2>.Blue, FarPoint.Win.Spread.</FONT><FONT color=#008080 size=2>GridLines</FONT><FONT size=2>.Both, System.Drawing.</FONT><FONT color=#008080 size=2>SystemColors</FONT><FONT size=2>.Control, System.Drawing.</FONT><FONT color=#008080 size=2>SystemColors</FONT><FONT size=2>.Control, System.Drawing.</FONT><FONT color=#008080 size=2>SystemColors</FONT><FONT size=2>.Control, System.Drawing.</FONT><FONT color=#008080 size=2>SystemColors</FONT><FONT size=2>.Control, </FONT><FONT color=#008080 size=2>Color</FONT><FONT size=2>.LightGray, </FONT><FONT color=#008080 size=2>Color</FONT><FONT size=2>.Gray,</FONT><FONT color=#0000ff size=2>false</FONT><FONT size=2>, </FONT><FONT color=#0000ff size=2>false</FONT><FONT size=2>, </FONT><FONT color=#0000ff size=2>true</FONT><FONT size=2>, </FONT><FONT color=#0000ff size=2>true</FONT><FONT size=2>, </FONT><FONT color=#0000ff size=2>true</FONT><FONT size=2>);


    </FONT><FONT color=#008000 size=2>skin.Apply(fpScenarioBuilderFour.Sheets[0]);

    </FONT><FONT size=2>

    fpScenarioBuilderFour.Sheets[0].GrayAreaBackColor = skin.BackColor;

    </FONT>

    Thanks,


    Mamata

Need extra support?

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

Learn More

Forum Channels