FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > AlternatingRow Class : BackColor Property |
'Declaration Public Property BackColor As Color
'Usage Dim instance As AlternatingRow Dim value As Color instance.BackColor = value value = instance.BackColor
public Color BackColor {get; set;}
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 background color.
Specify the text color for the cell by setting the ForeColor property.
FpSpread1.Sheets[0].AlternatingRows.Count = 3; FpSpread1.Sheets[0].Name = "Sheet1"; FpSpread1.Sheets[1].Name = "Sheet2"; FpSpread1.Sheets[0].ColumnCount = 5; FpSpread1.Sheets[1].ColumnCount = 5; FpSpread1.Sheets[0].RowCount = 10; FpSpread1.Sheets[1].RowCount = 10; FpSpread1.Sheets[0].AlternatingRows[0].BackColor = Color.Red; FpSpread1.Sheets[0].AlternatingRows[1].BackColor = Color.LightSkyBlue; FpSpread1.Sheets[0].AlternatingRows[2].BackColor = Color.LightGreen; FpSpread1.Sheets[1].AlternatingRows[0].BackColor = Color.Red; FpSpread1.Sheets[1].AlternatingRows[1].BackColor = Color.LightSkyBlue; FpSpread1.Sheets[0].AlternatingRows[1].ForeColor = Color.Red; FpSpread1.Sheets[1].AlternatingRows[1].ForeColor = Color.OrangeRed;
FpSpread1.Sheets(0).AlternatingRows.Count = 3 FpSpread1.Sheets(0).Name = "Sheet1" FpSpread1.Sheets(1).Name = "Sheet2" FpSpread1.Sheets(0).ColumnCount = 5 FpSpread1.Sheets(1).ColumnCount = 5 FpSpread1.Sheets(0).RowCount = 10 FpSpread1.Sheets(1).RowCount = 10 FpSpread1.Sheets(0).AlternatingRows(0).BackColor = Color.Red FpSpread1.Sheets(0).AlternatingRows(1).BackColor = Color.LightSkyBlue FpSpread1.Sheets(0).AlternatingRows(2).BackColor = Color.LightGreen FpSpread1.Sheets(1).AlternatingRows(0).BackColor = Color.Red FpSpread1.Sheets(1).AlternatingRows(1).BackColor = Color.LightSkyBlue FpSpread1.Sheets(0).AlternatingRows(1).ForeColor = Color.Red FpSpread1.Sheets(1).AlternatingRows(1).ForeColor = Color.OrangeRed
Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional