0

The FieldAttribute.Group property does not work when applied to a collection. In the example below, on the rules editor I get two menu items (group, OTHER). Under the group menu item I get MyField and under OTHER I get MyCollection and OtherField. I expect that group to have MyField and 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)
};

enter image description here

Wagner DosAnjos
  • 6,304
  • 1
  • 15
  • 29

0 Answers0