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


Glossary Item Box

Resets the BackColor property to its default value.

Syntax

Visual Basic (Declaration) 
Public Sub ResetBackColor() 
Visual Basic (Usage)Copy Code
Dim instance As StyleInfo
 
instance.ResetBackColor()
C# 
public void ResetBackColor()

Example

This example uses the ResetBackcolor method.
C#Copy Code
protected void Page_Load(object sender, EventArgs e)
        {
            if (this.IsPostBack) return;

            FpSpread1.Sheets[0].ColumnCount = 7;
            FpSpread1.Sheets[0].RowCount = 1000;
            FarPoint.Web.Spread.StyleInfo altrowstyle = new FarPoint.Web.Spread.StyleInfo();
            altrowstyle.BackColor = System.Drawing.Color.LemonChiffon;
            altrowstyle.ForeColor = System.Drawing.Color.Navy;
            altrowstyle.Border = new FarPoint.Web.Spread.Border(BorderStyle.Dashed, System.Drawing.Color.DarkBlue);
            altrowstyle.TabStop = true;
            altrowstyle.Font.Bold = true;
            FarPoint.Web.Spread.Model.DefaultSheetStyleModel altrowmodel = new FarPoint.Web.Spread.Model.DefaultSheetStyleModel(1000, 7);
            altrowmodel.SetDirectAltRowInfo(1, altrowstyle);
            FpSpread1.Sheets[0].StyleModel = altrowmodel;
            //altrowstyle.ResetBackColor();
            //altrowstyle.ResetBorder();
        }

VB.NETCopy Code
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If (IsPostBack) Then
            Return
        End If

        FpSpread1.Sheets(0).ColumnCount = 7
        FpSpread1.Sheets(0).RowCount = 1000
        Dim altrowstyle As New FarPoint.Web.Spread.StyleInfo()
        altrowstyle.BackColor = System.Drawing.Color.LemonChiffon
        altrowstyle.ForeColor = System.Drawing.Color.Navy
        altrowstyle.Border = New FarPoint.Web.Spread.Border(BorderStyle.Dashed, System.Drawing.Color.DarkBlue)
        altrowstyle.TabStop = True
        altrowstyle.Font.Bold = True
        Dim altrowmodel As New FarPoint.Web.Spread.Model.DefaultSheetStyleModel(1000, 7)
        altrowmodel.SetDirectAltRowInfo(1, altrowstyle)
        FpSpread1.Sheets(0).StyleModel = altrowmodel
        'altrowstyle.ResetBackColor()
        'altrowstyle.ResetBorder()
    End Sub

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.