这和表格边框的Collapse属性设置有关
针对header部分可以在Render中添加一下代码:
- protected override void Render(HtmlTextWriter writer)
- {
- Table cht = FpSpread1.FindControl("cht") as Table;
- cht.Style[HtmlTextWriterStyle.BorderCollapse] = "separate";
- base.Render(writer);
- }
复制代码
针对内容区域的单元格可以使用下面的代码:
- FpSpread1.Sheets[0].Columns[2].Border = new FarPoint.Web.Spread.Border(BorderStyle.Solid, ColorTranslator.FromHtml("#FF0000"), 1);
复制代码 |