Decimal marker in WPF grid cell disappears

When typing numbers into a datagrid cell that should be single (ie the attached datatable has this column as a single) the decimal point is ignored when it is typed after a numeral. When typed after a letter or at the start of the number it is retained.

This post has the fix:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/8855666a-ca0a-4646-903d-931cbb3111b0/strange-behavior-entering-text-in-a-cell-of-a-datagrid-decimal-point-ignored?forum=wpf

See also https://docs.microsoft.com/en-ca/dotnet/api/system.windows.frameworkcompatibilitypreferences.keeptextboxdisplaysynchronizedwithtextproperty?view=netframework-4.7.1#System_Windows_FrameworkCompatibilityPreferences_KeepTextBoxDisplaySynchronizedWithTextProperty.

Leave a Reply

Your email address will not be published. Required fields are marked *