您好:
您可以参考随软件安装的帮助文档中Creating Alternating Rows章节。
Sheet对象上有AlternatingRows属性,您通过对它的设置可以达到想要的效果。示例代码如下:
[C#]
fpSpread1.Sheets[0].AlternatingRows.Count = 3;
fpSpread1.Sheets[0].AlternatingRows[0].BackColor = Color.RoyalBlue;
fpSpread1.Sheets[0].AlternatingRows[0].ForeColor = Color.Navy;
fpSpread1.Sheets[0].AlternatingRows[1].BackColor = Color.LightYellow;
fpSpread1.Sheets[0].AlternatingRows[1].ForeColor = Color.Navy;
fpSpread1.Sheets[0].AlternatingRows[2].BackColor = Color.Salmon;
fpSpread1.Sheets[0].AlternatingRows[2].ForeColor = Color.Navy;
[Visual Basic]
FpSpread1.Sheets(0).AlternatingRows.Count = 3
FpSpread1.Sheets(0).AlternatingRows(0).BackColor = Color.RoyalBlue
FpSpread1.Sheets(0).AlternatingRows(0).ForeColor = Color.Navy
FpSpread1.Sheets(0).AlternatingRows(1).BackColor = Color.LightYellow
FpSpread1.Sheets(0).AlternatingRows(1).ForeColor = Color.Navy
FpSpread1.Sheets(0).AlternatingRows(2).BackColor = Color.Salmon
FpSpread1.Sheets(0).AlternatingRows(2).ForeColor = Color.Navy |