Spread for ASP.NET 7.0 Product Documentation
Formatter Property
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > StyleInfo Class : Formatter Property


Glossary Item Box

Gets or sets the formatter to use.

Syntax

Visual Basic (Declaration) 
Public Overridable Property Formatter As IFormatter
Visual Basic (Usage)Copy Code
Dim instance As StyleInfo
Dim value As IFormatter
 
instance.Formatter = value
 
value = instance.Formatter
C# 
public virtual IFormatter Formatter {get; set;}

Property Value

IFormatter object containing the formatter for the cells of this style

Remarks

This property is available at run time only.

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 returns the formatter for the style.
C#Copy Code
FarPoint.Web.Spread.StyleInfo copy = new FarPoint.Web.Spread.StyleInfo("DataAreaDefault");
copy.Border = new FarPoint.Web.Spread.Border(BorderStyle.Dotted, Color.DarkBlue);
copy.CellType = new FarPoint.Web.Spread.CheckBoxCellType();
FarPoint.Web.Spread.StyleInfo si = new FarPoint.Web.Spread.StyleInfo(copy);
FarPoint.Web.Spread.Renderer.IFormatter f;
f = si.Formatter;
Response.Write("The formatter for the style is a " + Convert.ToString(f));
FpSpread1.ActiveSheetView.DefaultStyle = si; 
Visual BasicCopy Code
Dim copy As New FarPoint.Web.Spread.StyleInfo("DataAreaDefault")
copy.Border = New FarPoint.Web.Spread.Border(BorderStyle.Dotted, Color.DarkBlue)
copy.CellType = New FarPoint.Web.Spread.CheckBoxCellType
Dim si As New FarPoint.Web.Spread.StyleInfo(copy)
Dim f As FarPoint.Web.Spread.Renderer.IFormatter
f = si.Formatter
Response.Write("The formatter for the style is a " & Convert.ToString(f))
FpSpread1.ActiveSheetView.DefaultStyle = si 

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.