回复 3楼luoyefeng的帖子
谢谢提醒 :Z
可以试试StyleName这个类,参考代码如下:
- NamedStyle stl = new NamedStyle("stlName");
- stl.BackColor = Color.Red;
- stl.Background = new Background(false);
- stl.Border = new Border(BorderStyle.Solid, Color.Yellow);
- this.FpSpread1.NamedStyles.Add(stl);
- FpSpread1.Rows[0].StyleName = "stlName";
- FpSpread1.Rows[1].StyleName = "stlName";
- FpSpread1.Rows[2].StyleName = "stlName";
- this.FpSpread1.Rows.Add(0, 3);
- FpSpread1.Rows[0].StyleName = "stlName";
- FpSpread1.Rows[1].StyleName = "stlName";
- FpSpread1.Rows[2].StyleName = "stlName";
复制代码 |