Declined
Last Updated: 02 Dec 2015 13:30 by ADMIN
ADMIN
Paul
Created on: 01 Jul 2013 06:11
Category: GridView
Type: Bug Report
0
FIX. RadGridView - GridViewMaskBoxColumn does not visualize masked string properly
When a mask is set to a GridViewMaskBoxColumn and string is applied as value, the visual element will show only the string without the mask literals. E.g. mask is set to ####/# and value is set to string "11112" the view will be 11112 instead of 1111/2.

Ways to achieve this: 
1. Use CellFormatting.
2. Use a custom type converter:
Example of a custom TypeConverter could be seen from the following feedback item: http://feedback.telerik.com/Project/154/Feedback/Details/112463-fix-radgridview-the-textmaskformat-property-of-gridviewmaskboxcolumn-is-not-ta
1 comment
ADMIN
Ivan Petrov
Posted on: 09 Nov 2015 13:07
As a general, strings are not very flexible when it comes to formatting. Preferably, numeric data should be stored as one of the numeric formats.

Numbers stored as strings cannot be formatted as if they are numbers. Here is some more info on why the above case does not work.
The "#" symbol is a placeholder for a digit or space as stated in the following MSDN article:
https://msdn.microsoft.com/en-us/library/system.windows.forms.maskedtextbox.mask(v=vs.110).aspx
This is why it does not format the string value from the grid. 
Additionally the "/" symbol is a date separator, also described in the above article. The "/" will be replaced, with whatever the current Windows date separator setting is, in the masked editor.