Page tree
Skip to end of metadata
Go to start of metadata

1.描述

在活字格中,有一个特殊的编辑器“公式选择编辑器”,您可以选择单元格或者输入公式。

2.特殊属性编辑器

如果您需要使用这个编辑器,您可以为属性添加活字格自定义的FormulaPropertyAttribute,并设置属性类型为object。

public class DemoCellType : CellType
{
    [FormulaProperty]
    public object NotifyNumber
    {
        get; set;
    }
}

效果如下:

在命令插件中,您还可以在FormulaProperty特性中添加参数OnlySupportCell来设置只支持选择单元格。

public class DemoCommand : Command
{
    [FormulaProperty(true)]
    public object FormulaProperty { get; set; }
}

如果您定义OnlySupportCelltrue,而选择了单元格区域或者函数时,在命令提交时,会弹出如下错误信息:


回到顶部

  • No labels