# EditorX List or Array of Enums with \[Flags\] attribute not working

**URL:** <https://forum.opentap.io/t/editorx-list-or-array-of-enums-with-flags-attribute-not-working/1428>\
**Category:** General\
**Created:** [February 28, 2024, 3:10pm UTC](https://forum.opentap.io/t/editorx-list-or-array-of-enums-with-flags-attribute-not-working/1428 "2024-02-28T15:10:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wittrock](https://avatars.discourse-cdn.com/v4/letter/w/e8c25b/32.png) [@wittrock](https://forum.opentap.io/u/wittrock)\
**Post date:** [February 28, 2024, 3:10pm UTC](https://forum.opentap.io/t/editorx-list-or-array-of-enums-with-flags-attribute-not-working/1428/1 "2024-02-28T15:10:03Z")

</div>

I am using a property that is a List of enums with the [Flags] attribute.  
When I attempt to edit the property in EditorX, the list shows up properly as do the individual check boxes for the flags, but any changes I make are not preserved.

If I replace the enum with a class containing a bool member in place of the [Flags], then it works.  
Unfortunately, there are a some unrelated reasons I need to use the enum so was hoping there is some workaround.

Example snipped from my plugin step:

This is the definition of the enums

```csharp
    public class ProbeRailInstrument : Instrument
    {
        [Flags]
        public enum AnalogChannel
        {
            [Display("V1")]
            V1 = 1,
            [Display("V2")]
            V2 = 2,
            [Display("I")]
            I = 4,
            [Display("C")]
            C = 8,
        }

        [Flags]
        public enum EventChannel
        {
            [Display("E+")]
            E = 1,
            [Display("E-")]
            C = 2,
        }
...

```

These are the properties in my test step

```csharp
        [Display("Analogs", Group:"Channels", Order:5.1)]
        [EnabledIf(nameof(ControlMethod), ControlSetting.Independent, HideIfDisabled = true)]
        public List<ProbeRailInstrument.AnalogChannel> Analogs{get; set;}

        [Display("Events", Group:"Channels", Order:5.2)]
        [EnabledIf(nameof(ControlMethod), ControlSetting.Independent, HideIfDisabled = true)]
        public List<ProbeRailInstrument.EventChannel> Events{get; set;}

```

Since they show up correctly, I think everything above is OK. Also, I use a similar enum outside of a List and the property can be edited successfully.

I also changed from a List to an Array but still no difference so the problem seems to be with the enums.

If I manually edit the test plan, everything works as expected, and the manually edited values show up in the list editor in EditorX. I just cant make any changes within EditorX and have the changes preserved once the List editor is closed.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opentap/original/2X/c/ce87d497e596a196b40718f0f89d49f9f516c219.png)

Thanks for any input,  
Wittrock

---

<div class="post-metadata">

**Author:** ![khang-yong](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opentap.io/khang-yong/32/322_2.png) [@khang-yong](https://forum.opentap.io/u/khang-yong)\
**Post date:** [March 19, 2024, 2:14am UTC](https://forum.opentap.io/t/editorx-list-or-array-of-enums-with-flags-attribute-not-working/1428/2 "2024-03-19T02:14:30Z")

</div>

Hi Wittrock, we’ll investivate on this problem. But given our schedules and priorities, the fix might not come so soon.

---

<div class="post-metadata">

**Author:** ![wittrock](https://avatars.discourse-cdn.com/v4/letter/w/e8c25b/32.png) [@wittrock](https://forum.opentap.io/u/wittrock)\
**Post date:** [March 19, 2024, 11:45am UTC](https://forum.opentap.io/t/editorx-list-or-array-of-enums-with-flags-attribute-not-working/1428/3 "2024-03-19T11:45:33Z")

</div>

Thanks @khang-yong ,

Yes, I understand using the enums flags in the list is probably not that common a need.  
I am able to just manually edit the TapPlan for my needs.

Thanks so much,  
Wittrock
