Spread ASP.NET 17
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / Column Class / Formatter Property
Example


In This Topic
    Formatter Property (Column)
    In This Topic
    Gets or sets the default formatter for cells in this column.
    Syntax
    'Declaration
     
    
    Public Property Formatter As IFormatter
    'Usage
     
    
    Dim instance As Column
    Dim value As IFormatter
     
    instance.Formatter = value
     
    value = instance.Formatter
    public IFormatter Formatter {get; set;}

    Property Value

    IFormatter object containing the formatter for cells in this column
    Example
    This example creates a Column object and an IFormatter object. The IFormatter object is declared as a CurrencyFormatter and is then used as the formatter for the Column object. To verify this, the Column objects formatter is returned in a text box.
    FarPoint.Web.Spread.Column mycol;
    FarPoint.Web.Spread.Renderer.IFormatter formatter;
    mycol=FpSpread1.ActiveSheetView.Columns[0];
    formatter=new FarPoint.Web.Spread.Renderer.CurrencyFormatter();
    mycol.Formatter=formatter;
    TextBox1.Text=Convert.ToString(mycol.Formatter);
    Dim mycol As FarPoint.Web.Spread.Column
    Dim formatter As FarPoint.Web.Spread.Renderer.IFormatter
    mycol=FpSpread1.ActiveSheetView.Columns(0)
    formatter=New FarPoint.Web.Spread.Renderer.CurrencyFormatter()
    mycol.Formatter=formatter
    TextBox1.Text=Convert.ToString(mycol.Formatter)
    See Also