Spread for ASP.NET 7.0 Product Documentation
Reset(SheetStyleProperty) Method
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > StyleInfo Class > Reset Method : Reset(SheetStyleProperty) Method


prop
Property to reset

Glossary Item Box

Resets a specified property for a style to its default setting.

Syntax

Visual Basic (Declaration) 
Public Overloads Overridable Sub Reset( _
   ByVal prop As SheetStyleProperty _
) 
Visual Basic (Usage)Copy Code
Dim instance As StyleInfo
Dim prop As SheetStyleProperty
 
instance.Reset(prop)
C# 
public virtual void Reset( 
   SheetStyleProperty prop
)

Parameters

prop
Property to reset

Remarks

This method resets all the style settings in a StyleInfo object to the default settings.

Example

This example creates a StyleInfo object, sets three of its properties and assigns it to the first cell in the active sheet, resets the BackColor property and then assigns it to cell (0, 2).
C#Copy Code
FarPoint.Web.Spread.StyleInfo info = new FarPoint.Web.Spread.StyleInfo();
info.BackColor = Color.Yellow;
info.ForeColor = Color.Red;
info.Font.Bold = true;
FpSpread1.ActiveSheetView.SetStyleInfo(0, 0, info);
FpSpread1.ActiveSheetView.SetValue(0, 0, "0, 0");

info.Reset(FarPoint.Web.Spread.SheetStyleProperty.BackColor);   
FpSpread1.ActiveSheetView.SetStyleInfo(0, 2, info);
FpSpread1.ActiveSheetView.SetValue(0, 2, "0, 2");
Visual BasicCopy Code
Dim info As New FarPoint.Web.Spread.StyleInfo()
info.BackColor = Color.Yellow
info.ForeColor = Color.Red
info.Font.Bold = True
FpSpread1.ActiveSheetView.SetStyleInfo(0, 0, info)
FpSpread1.ActiveSheetView.SetValue(0, 0, "0, 0")

info.Reset(FarPoint.Web.Spread.SheetStyleProperty.BackColor)
FpSpread1.ActiveSheetView.SetStyleInfo(0, 2, info)
FpSpread1.ActiveSheetView.SetValue(0, 2, "0, 2")

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.