你好,需要自定义单元格类型来实现该功能,代码如下:
- public class MyCellType : FarPoint.Win.Spread.CellType.TextCellType
- {
- public override void PaintCell(Graphics g, Rectangle r, FarPoint.Win.Spread.Appearance appearance, object value, bool isSelected, bool isLocked, float zoomFactor)
- {
- if (value == null)
- {
- value = "0";
- }
- base.PaintCell(g, r, appearance, value, isSelected, isLocked, zoomFactor);
- }
- }
复制代码 |