Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Display enum literal value on Grid

(0) ShareShare
ReportReport
Posted on by

I have a grid on a form and one of the fields in the table is an enum. How do I display the enum literal value as read-only in the grid?

*This post is locked for comments

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Display enum literal value on Grid

    The EnumType in the table was set to an enum that didn't exist. When I changed it to the proper enum, it works. Issue resolved. My apologies for the unnecessary posting.

  • Sohaib Cheema Profile Picture
    46,614 User Group Leader on at
    RE: Display enum literal value on Grid

    if field is not visible on form you need to see few points

    1) is field, having any specific configuration key?

    2) is field having specific countryRegionId?

    3) is field being hided anywhere by code?

  • Community Member Profile Picture
    on at
    RE: Display enum literal value on Grid

    The issue is that when I add the field to the grid, it doesn't display on the form at runtime.

  • Martin Dráb Profile Picture
    231,923 Most Valuable Professional on at
    RE: Display enum literal value on Grid

    And what's the problem? If you see any value in setting labels of your enum elements to "0=Error" and "1=Resubmitted", just do it.

  • Community Member Profile Picture
    on at
    RE: Display enum literal value on Grid

    There is another process which runs which will update an errorlog table when issues are encountered. The form that I am building allows the user to address the errors listed in the table, allow them to edit a couple of values and then resubmit if they choose. One of the fields is error text which they are not allowed to change. The other field is a status field which is an enum field which they cannot change. It will have values such as 0=Error, 1=Resubmitted. There is a resubmit button on the form which will allow the user to resubmit the one or more issues that were fixed.

  • Martin Dráb Profile Picture
    231,923 Most Valuable Professional on at
    RE: Display enum literal value on Grid

    Yes, enums are lists of values, therefore they're rendered using combobox.

    Maybe you should explain in better detail what you're trying to achieve.

  • Community Member Profile Picture
    on at
    RE: Display enum literal value on Grid

    I did exactly what you suggested, and it doesn't show up in the grid at runtime. When I drag it into the grid, it creates it as a combobox.

  • Suggested answer
    Martin Dráb Profile Picture
    231,923 Most Valuable Professional on at
    RE: Display enum literal value on Grid

    As any another field. Set the datasource field with AllowEdit = No and drag it to the grid.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,238 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,923 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans