Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread Namespace / ColumnFooter Class / DefaultStyleName Property
Example


In This Topic
    DefaultStyleName Property (ColumnFooter)
    In This Topic
    Gets or sets the name of the default style for the column footer.
    Syntax
    'Declaration
     
    Public Property DefaultStyleName As String
    'Usage
     
    Dim instance As ColumnFooter
    Dim value As String
     
    instance.DefaultStyleName = value
     
    value = instance.DefaultStyleName
    public string DefaultStyleName {get; set;}
    Exceptions
    ExceptionDescription
    Specified style (NamedStyle object) could not be found in the collection
    Example
    This example creates a column footer.
    fpSpread1.Sheets[0].RowCount = 10;
    fpSpread1.Sheets[0].ColumnCount = 15;
    // Show the footer.
    fpSpread1.Sheets[0].ColumnFooter.Visible = true;
    fpSpread1.Sheets[0].ColumnFooter.RowCount = 2;
    
    FarPoint.Win.Spread.NamedStyle nstyleheaders = new FarPoint.Win.Spread.NamedStyle("test");
    nstyleheaders.BackColor = Color.Red;
    fpSpread1.NamedStyles.Add(nstyleheaders);
    fpSpread1.Sheets[0].ColumnFooter.DefaultStyle  = nstyleheaders;
    fpSpread1.Sheets[0].ColumnFooter.DefaultStyleName  = "test";
    fpSpread1.Sheets(0).RowCount = 10
    fpSpread1.Sheets(0).ColumnCount = 15
    ' Show the footer.
    fpSpread1.Sheets(0).ColumnFooter.Visible = True
    fpSpread1.Sheets(0).ColumnFooter.RowCount = 2
    
    Dim nstyleheaders As New FarPoint.Win.Spread.NamedStyle("test")
    nstyleheaders.BackColor = Color.Red
    fpSpread1.NamedStyles.Add(nstyleheaders)
    fpSpread1.Sheets(0).ColumnFooter.DefaultStyle = nstyleheaders
    fpSpread1.Sheets(0).ColumnFooter.DefaultStyleName  = "test"
    See Also