cngrain 你好
从你Spread中单元格的布局来看,可以使用下面的代码设置相应单元格的边框,从而达到解决红框中线粗的问题:
- protected override void Render(HtmlTextWriter writer)
- {
- Table table = FpSpread1.FindControl("viewport") as Table;
- if (table != null)
- {
- for (int row = 0; row < FpSpread1.ActiveSheetView.RowCount - FpSpread1.ActiveSheetView.FrozenRowCount; row++)
- {
- table.Rows[row].Cells[0].Style["border-left-color"] = "rgb(192, 192, 192)";
- }
- for (int col = 0; col < FpSpread1.ActiveSheetView.ColumnCount - FpSpread1.ActiveSheetView.FrozenColumnCount; col++)
- {
- table.Rows[0].Cells[col].Style["border-top-color"] = "rgb(192, 192, 192)";
- }
- }
- Table table1 = FpSpread1.FindControl("viewport1") as Table;
- if (table1 != null)
- {
- for (int row = 0; row < FpSpread1.ActiveSheetView.FrozenRowCount; row++)
- {
- table1.Rows[row].Cells[0].Style["border-left-color"] = "rgb(192, 192, 192)";
- }
- }
- Table table2 = FpSpread1.FindControl("viewport2") as Table;
- if (table2 != null)
- {
- table2.Rows[0].Cells[0].Style["border-top-color"] = "rgb(192, 192, 192)";
- table2.Rows[0].Cells[0].Style["border-rigth-color"] = "rgb(192, 192, 192)";
- }
- base.Render(writer);
- }
复制代码 |