非常抱歉,之前给你回复的是WinForm版本的。
Web版本的Spread可以参见Border章节。
下面代码示例显示了Border的用法。- FarPoint.Web.Spread.CurrencyCellType currcell = new FarPoint.Web.Spread.CurrencyCellType();
- FarPoint.Web.Spread.Border aborder = new FarPoint.Web.Spread.Border();
- FarPoint.Web.Spread.StyleInfo currstyle = new FarPoint.Web.Spread.StyleInfo();
- FpSpread1.Sheets[0].ColumnCount = 7;
- FpSpread1.Sheets[0].RowCount = 50;
- currcell.Size = 20;
- aborder.BorderColorBottom = Color.Blue;
- aborder.BorderColorLeft = Color.Blue;
- aborder.BorderSize = 5;
- aborder.BorderStyleBottom = BorderStyle.Double;
- aborder.BorderStyleLeft = BorderStyle.Double;
- aborder.BorderStyleRight = BorderStyle.Groove;
- aborder.BorderStyleTop = BorderStyle.Groove;
- currstyle.CellType = currcell;
- currstyle.Border = aborder;
- FpSpread1.Sheets[0].SetStyleInfo(-1, 0, currstyle);
复制代码 |