先看效果
实现:
FarPoint.Web.Spread.StyleInfo Errorcss = new FarPoint.Web.Spread.StyleInfo();
Errorcss.Border.BorderColor = System.Drawing.Color.FromArgb(255, 236, 139);
Errorcss.Border.BorderSize = 2;
Errorcss.Border.BorderStyle = BorderStyle.Solid;
Errorcss.Background.BackgroundImageUrl = "../../image/Annotation.gif";
Errorcss.Background.BackgroundRepeat = "no-repeat";
Errorcss.Background.BackgroundPosition = "100% 0%"; Fp.ActiveSheetView.SetStyleInfo(row, col, Errorcss);
Fp.ActiveSheetView.Cells[row, col].Note = "此列不允许为空!";