从精华区找到如下代码解决冻结行boder问题
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.FpSpread1.Sheets[0].FrozenRowCount = 1;
}
}
protected override void Render(HtmlTextWriter writer)
{
Table frozenTable = this.FpSpread1.FindControl("viewport1") as Table;
frozenTable.Style.Value = "border-bottom: #d0d7e5 0px solid; position: "+
"relative; border-left: #d0d7e5 1px solid; width: 1px; border-collapse:"+
" collapse; table-layout: fixed; border-top: #d0d7e5 1px solid; top: 0px;"+
" cursor: default; border-right: #d0d7e5 1px solid;";
base.Render(writer);
}
如果加载的卡片没有设置冻结行,Table frozenTable 对象就是 null,此时该如何正常输出该xml文件的原来样式。(xml来自spread设计器设计保存的文件)
protected override void Render(HtmlTextWriter writer)
{
Table frozenTable = this.FpSpread1.FindControl("viewport1") as Table;
frozenTable.Style.Value = "border-bottom: #d0d7e5 0px solid; position: "+
"relative; border-left: #d0d7e5 1px solid; width: 1px; border-collapse:"+
" collapse; table-layout: fixed; border-top: #d0d7e5 1px solid; top: 0px;"+
" cursor: default; border-right: #d0d7e5 1px solid;";
base.Render(writer);
} |
|