给你验证了第二种方式
自定义单元格类型,重写编辑控件
- public class CusTextCellType : TextCellType
- {
- public override Control GetEditorControl(Control parent, FarPoint.Win.Spread.Appearance appearance, float zoomFactor)
- {
- appearance.ForeColor = System.Drawing.Color.Red;
- return base.GetEditorControl(parent, appearance, zoomFactor);
- }
- }
复制代码
设置此类型为默认类型
- fpSpread1.ActiveSheet.DefaultStyle.CellType = new CusTextCellType();
复制代码
|