Base solution for your next web application
Open Closed

How do we add our own enum that will be shown in a dropdown list in Powertools? #12100


User avatar
0
litojuliano created

How do we add our own enum that will be shown in a dropdown list in Powertools?


5 Answer(s)
  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @litojuliano,

    The Power Tools scans all solution files and detects enums. You can create your custom enum in your project. And it will seem at there.

  • User Avatar
    0
    litojuliano created

    Hi @m.aliozkaya

    Thanks for reply,

    I tried, created and rebuild solution but still not shown.

  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @litojuliano,

    Could you share your project with [email protected]?

  • User Avatar
    0
    litojuliano created

    Hi m.aliozkaya

    I'd sent project solution, hope will resolve soonest.

    Thanks and Best Regards,

    Lito

    Hi @litojuliano,

    Could you share your project with [email protected]?

  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @litojuliano,

    I checked the project. Your enum is not looking correct. It should be like this.

    public enum PriceType
    {
        GroupA = 1,
        GroupB = 2,
        GroupC = 3,
        GroupD = 4
    }
    

    Csharp does not support string value for enums. I recommend reading this blog post, hope this will help https://josipmisko.com/posts/string-enums-in-c-sharp-everything-you-need-to-know