This means that while editing content, the programmatic value of your setting is also used as the label for itself. If you have prevalues that may not be very user-friendly (like css class names etc. that cannot have spaces or punctuation) this situation is not optimal.
So instead, I figured out a way to have a user-friendly label separate from the actual prevalue. The following example uses a modified version of the radiobuttonlist called "friendlyradiobuttonlist."
Paste the following code in /App_Plugins/FriendlyGrid/prevalueeditors/friendlyradiobuttonlist.html
You'll notice it looks very similar to its counterpart in /Umbraco/Views/prevalueeditors/radiobuttonlist.html
Then whenever you create a setting that has a prevalue list, do something like the following. Notice the prevalues array is not of strings, but of objects with "label" and "value" properties:
TIP: user-friendly labels for prevalues in grid settings/styles
In the grid's documentation, it shows that prevalues can only be expressed as a simple array of strings: https://our.umbraco.org/Documentation/Getting-Started/Data/Content-Entry/Grid-Layout
This means that while editing content, the programmatic value of your setting is also used as the label for itself. If you have prevalues that may not be very user-friendly (like css class names etc. that cannot have spaces or punctuation) this situation is not optimal.
So instead, I figured out a way to have a user-friendly label separate from the actual prevalue. The following example uses a modified version of the radiobuttonlist called "friendlyradiobuttonlist."
http://codepen.io/anon/pen/pJaNab (look at HTML box)
You'll notice it looks very similar to its counterpart in /Umbraco/Views/prevalueeditors/radiobuttonlist.html
http://codepen.io/anon/pen/pJaNab (look at JS box)
Exactly what I was looking for. #h5yr!
is working on a reply...