for (int j = 0; j < fp.ActiveSheetView.ColumnCount; j++)
            {                                
                    fp.ActiveSheetView.ColumnHeader.Cells[0, j].Background.BackgroundImageUrl = "../../image/warning.png";
                    fp.ActiveSheetView.ColumnHeader.Cells[0, j].Background.BackgroundRepeat = "no-repeat";
                    fp.ActiveSheetView.ColumnHeader.Cells[0, j].Background.BackgroundPosition = "Left";
                    fp.ActiveSheetView.ColumnHeader.Cells[0, j].Note = "第" + j.ToString() + "列";
            }

在初始化Fpspread的时候设置表头的Node属性

 

 protected override void Render(HtmlTextWriter writer)
{
     Table cht = this.FpSpread1.FindControl("cht") as Table;
     for (int j = 0; j < FpSpread1.ActiveSheetView.ColumnHeader.Columns.Count; j++)
     {
          if (FpSpread1.ActiveSheetView.ColumnHeader.Cells[0, j].Background.BackgroundImageUrl == "../../image/warning.png")
         {
               cht.Rows[0].Cells[j].Attributes.Add("title", FpSpread1.ActiveSheetView.ColumnHeader.Cells[0, j].Note);
         }
     }
base.Render(writer);
}

 在Render中把Note值给title

相关文章:

  • 2021-04-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2021-06-21
猜你喜欢
  • 2022-12-23
  • 2021-11-17
  • 2022-01-08
  • 2021-11-07
  • 2022-02-21
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案