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


Glossary Item Box

Gets or sets a value that indicates whether the negative border color is used to paint the border for the negative value.

Syntax

Visual Basic (Declaration) 
Public Property UseNegativeBorderColor As Boolean
Visual Basic (Usage)Copy Code
Dim instance As DatabarConditionalFormattingRule
Dim value As Boolean
 
instance.UseNegativeBorderColor = value
 
value = instance.UseNegativeBorderColor
C# 
public bool UseNegativeBorderColor {get; set;}

Property Value

true if the negative border color is used to paint the border for the negative value; otherwise, false.

Example

This example sets the UseNegativeBorderColor property.
C#Copy Code
protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack) return;
            FpSpread1.Sheets[0].RowCount = 4;
            FpSpread1.Sheets[0].Cells[0, 0].Value = 2;
            FpSpread1.Sheets[0].Cells[1, 0].Value = -1;
            FpSpread1.Sheets[0].Cells[3, 0].Value = 3;
            FarPoint.Web.Spread.DatabarConditionalFormattingRule dataBarRule = new FarPoint.Web.Spread.DatabarConditionalFormattingRule();
            dataBarRule.AxisPosition = FarPoint.Web.Spread.DataBarAxisPosition.Automatic;
            dataBarRule.BorderColor = System.Drawing.Color.Blue;
            dataBarRule.NegativeFillColor = System.Drawing.Color.Red;
            dataBarRule.Gradient = true;
            dataBarRule.Maximum = new FarPoint.Web.Spread.ConditionalFormattingValue(FarPoint.Web.Spread.ConditionalFormattingValueType.AutoMax);
            dataBarRule.Minimum = new FarPoint.Web.Spread.ConditionalFormattingValue(FarPoint.Web.Spread.ConditionalFormattingValueType.AutoMin);
            dataBarRule.UseNegativeFillColor = true;
            dataBarRule.UseNegativeBorderColor = false;

            FarPoint.Web.Spread.ConditionalFormatting cf = new FarPoint.Web.Spread.ConditionalFormatting(new FarPoint.Web.Spread.Model.CellRange(0, 0, 4, 1));
            cf.Add(dataBarRule);
            FpSpread1.ActiveSheetView.ConditionalFormatting.Add(cf);           
        }
VB.NETCopy Code
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load      
        If (IsPostBack) Then Return
        FpSpread1.Sheets(0).RowCount = 4
        FpSpread1.Sheets(0).Cells(0, 0).Value = 2
        FpSpread1.Sheets(0).Cells(1, 0).Value = -1
        FpSpread1.Sheets(0).Cells(3, 0).Value = 3
        Dim dataBarRule As New FarPoint.Web.Spread.DatabarConditionalFormattingRule()
        dataBarRule.AxisPosition = FarPoint.Web.Spread.DataBarAxisPosition.Automatic
        dataBarRule.BorderColor = Drawing.Color.Blue
        dataBarRule.NegativeFillColor = Drawing.Color.Red
        dataBarRule.Gradient = True
        dataBarRule.Maximum = New FarPoint.Web.Spread.ConditionalFormattingValue(FarPoint.Web.Spread.ConditionalFormattingValueType.AutoMax)
        dataBarRule.Minimum = New FarPoint.Web.Spread.ConditionalFormattingValue(FarPoint.Web.Spread.ConditionalFormattingValueType.AutoMin)
        dataBarRule.UseNegativeFillColor = True
        dataBarRule.UseNegativeBorderColor = False

        Dim cf As New FarPoint.Web.Spread.ConditionalFormatting(New FarPoint.Web.Spread.Model.CellRange(0, 0, 4, 1))
        cf.Add(dataBarRule)
        FpSpread1.ActiveSheetView.ConditionalFormatting.Add(cf)
    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.