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.

     
        FpSpread1.Sheets(0).HorizontalGridLine = New FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Flat, Color.Green)
    FpSpread1.Sheets(0).VerticalGridLine = New FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Flat, Color.Green)
     
  • 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


    FarPoint.Win.Spread.SheetSkin skin = new FarPoint.Win.Spread.SheetSkin("TestSkin", System.Drawing.SystemColors.Control, Color.DarkGray, Color.Black,Color.Blue, FarPoint.Win.Spread.GridLines.Both, System.Drawing.SystemColors.Control, System.Drawing.SystemColors.Control, System.Drawing.SystemColors.Control, System.Drawing.SystemColors.Control, Color.LightGray, Color.Gray,false, false, true, true, true);


    skin.Apply(fpScenarioBuilderFour.Sheets[0]);


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


    Thanks,


    Mamata

Need extra support?

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

Learn More

Forum Channels