Spread for ASP.NET 10 Product Documentation
Formatter Property (Cell)
Example 


Gets or sets the formatter for a cell.
Syntax
'Declaration
 
Public Property Formatter As IFormatter
'Usage
 
Dim instance As Cell
Dim value As IFormatter
 
instance.Formatter = value
 
value = instance.Formatter
public IFormatter Formatter {get; set;}

Property Value

IFormatter object containing the formatter for this cell
Remarks

The setting for this property can be overridden if a named style is assigned to the cell using the StyleName property, and that named style sets the formatter to use.

Example
This example creates a Cell object and an IFormatter object. The IFormatter object is declared as a CurrencyFormatter and is then used as the formatter for the Cell object. To verify this, the Cell objects formatter is returned in a text box.
FarPoint.Web.Spread.Cell mycell;
FarPoint.Web.Spread.Renderer.IFormatter formatter;
mycell=FpSpread1.Cells[0,0];
formatter=new FarPoint.Web.Spread.Renderer.CurrencyFormatter();
mycell.Formatter=formatter;
TextBox1.Text=Convert.ToString(mycell.Formatter);
Dim mycell As FarPoint.Web.Spread.Cell
Dim formatter As FarPoint.Web.Spread.Renderer.IFormatter
mycell=FpSpread1.Cells(0,0)
formatter=NewFarPoint.Web.Spread.Renderer.CurrencyFormatter()
mycell.Formatter=formatter
TextBox1.Text=Convert.ToString(mycell.Formatter)
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

Cell Class
Cell Members
IFormatter Interface
StyleName Property
NamedStyle Class

 

 


Copyright © GrapeCity, inc. All rights reserved.