Sheet Default Style Not Working

Posted by: karl on 20 July 2020, 11:53 am EST

    • Post Options:
    • Link

    Posted 20 July 2020, 11:53 am EST - Updated 30 September 2022, 1:30 pm EST

    I cannot get the sheetview.DefaultStyle to work. I have tried a plain vanilla project and pasted the code from your documentation example (https://help.grapecity.com/spread/SpreadNet12/WF/webframe.html#spwin-cellstyle.html) and it does not work. I had a friend of mine who also has Farpoint licensed at his work to do the same thing and fail as well.

    There is nothing that can be changed using the sheetview.DefaultStyle property. The colors and fonts stay the same no matter what. I have tried setting the properties directly and with a StyleInfo object… same results.

    The following code was used to generate the sheet attached below:

    
    Private Sub SetDefault()
            Dim style As New FarPoint.Win.Spread.StyleInfo With {
                .BackColor = Color.Teal,
                .ForeColor = Color.Yellow
            }
            FpSpread1_Sheet1.DefaultStyle = style
            For x As Integer = 0 To 4
                For y As Integer = 0 To 4
                    FpSpread1_Sheet1.Cells(x, y).Value = x + y
                Next
            Next
        End Sub
    
    

    Any ideas?

  • Posted 21 July 2020, 11:41 am EST

    Hi,

    To be able to use default styling, please set LegacyBehaviors to Style or All.

    With thanks,

    Ruchir

  • Posted 21 July 2020, 12:03 pm EST

    Hey Ruchir, thanks for the prompt reply.

    That’s kind of an important parameter that probably should have been mentioned in the DefaultStyle documentation. It is only mentioned in regards to alternating rows/columns, pattern and gradient fill, and auto row height.

  • Posted 22 July 2020, 3:33 am EST

    Hello,

    I have noted down your concern and have forwarded it to the developers[ID:10173]. I will let you know as soon as there is some information.

    Regards,

  • Posted 22 July 2020, 4:38 am EST

    Hi,

    The information is documented here: https://www.grapecity.com/spreadnet/docs/v13/readme/style.html

    Thanks,

    Ruchir.

Need extra support?

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

Learn More

Forum Channels