Announcements
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
As any another field. Set the datasource field with AllowEdit = No and drag it to the 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.
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.
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.
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.
The issue is that when I add the field to the grid, it doesn't display on the form at runtime.
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?
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.
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.