回复 3楼nangcat的帖子
隐隐约约的网格线-GridLine
实线的网格线-Border
设置 Border 会覆盖网格线。所以,设置BorderStyle.None之后网格线消失。可以通过修改 Border 颜色实现这个 Case ,参考代码:
- protected void Button1_Click(object sender, EventArgs e)
- {
- for (int i = 0; i < 3; i++)
- {
- for (int j = 0; j < 3; j++)
- {
- this.FpSpread1.Sheets[0].Cells[i, j].Border.BorderStyle = BorderStyle.Solid;
- }
- }
- }
- protected void Button2_Click(object sender, EventArgs e)
- {
- for (int i = 0; i < 3; i++)
- {
- for (int j = 0; j < 3; j++)
- {
- this.FpSpread1.Sheets[0].Cells[i, j].Border.BorderColor = Color.FromArgb(208, 215, 229);
- }
- }
- }
复制代码 |