Spread ASP.NET 18
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / Column Class / StyleName Property
Example


In This Topic
    StyleName Property (Column)
    In This Topic
    Gets or sets the name of the custom style for cells in this column.
    Syntax
    'Declaration
     
    
    Public Property StyleName As String
    'Usage
     
    
    Dim instance As Column
    Dim value As String
     
    instance.StyleName = value
     
    value = instance.StyleName
    public string StyleName {get; set;}

    Property Value

    String containing the name of the style for cells in this column
    Example
    This example creates two objects for the spreadsheet, a Column and a NamedStyle. The NamedStyle's BackColor is set to yellow, and applied to the Column object, which sets the first columns BackColor to yellow.
    FarPoint.Web.Spread.Column mycol;
    FarPoint.Web.Spread.NamedStylemn style=new FarPoint.Web.Spread.NamedStyle();
    mnstyle.Name="fpstyle";
    mnstyle.BackColor=Color.Yellow;
    FpSpread1.NamedStyles.Add(mnstyle);
    mycol=FpSpread1.ActiveSheetView.Columns[1];
    mycol.StyleName=mnstyle.Name;
    Dim mycol As FarPoint.Web.Spread.Column
    Dim mnstyle As New FarPoint.Web.Spread.NamedStyle()
    mnstyle.Name="fpstyle"
    mnstyle.BackColor=Color.Yellow
    FpSpread1.NamedStyles.Add(mnstyle)
    mycol=FpSpread1.ActiveSheetView.Columns(1)
    mycol.StyleName=mnstyle.Name
    See Also