Skip to content

Format decimal field on Datagrid in Edit Form #4538

Answered by bkea
bkea asked this question in Q&A
Discussion options

You must be logged in to vote

FIXED

I took it one step further on the simplification scale. I removed the NumberPicker and added the Decimals attribute to the DataGridNumericColumn element. I feel like the format should work by default based on the data type of the field. In any case I can now store a value of 2.101.

<DataGridNumericColumn Field="@nameof(CaliberInfo.oal_max)" Decimals="3" Caption="OAL Max" DisplayFormat="{0:N6}" DisplayFormatProvider="@System.Globalization.CultureInfo.GetCultureInfo("en-EN")" Editable>
            ```

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@bkea
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by bkea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants