该FieldAttribute.Group属性在应用于集合时不起作用。在下面的示例中,在规则编辑器中,我得到了两个菜单项(组、其他)。在我得到的group菜单项MyField下,OTHER我得到MyCollection和OtherField。我希望group有MyFieldand MyCollection。
public class MyModel
{
[Field(Settable = false, Group = "group")]
public int MyField { get; set; }
[Field(Settable = false, Group = "group")]
public List<int> MyCollection { get; set; }
[Field(Settable = false)]
public int OtherField { get; set; }
}
// here is how the editor is instantiated
RuleEditor editor = new RuleEditor("divRuleEditor")
{
Mode = Common.RuleType.Execution,
SourceType = typeof(MyModel)
};
