Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
EditorWithMask in a Grid Column not working
posted

Hello,

 I use the the EditorWithMask all the time to create different masks on columns in a Ultragrids dynamically without any problem.  However, today I have encountered a mask that just won't work.  I am trying to establish a mask that looks like this "5 min. 10 sec."  I want the literals to be written to the database.  When I go to edit the value the mask works just fine.  When I leave the cell the mask goes away and I am just left with 510.  

Here is the code that I am using (in the InitializeRow event): 

EmbeddableEditorBase editor = null;
DefaultEditorOwnerSettings editorSettings = new DefaultEditorOwnerSettings();

editorSettings.MaskInput = "nn mi\\n. nn sec.";
editorSettings.MaskDataMode = MaskMode.IncludeLiterals;
editorSettings.MaskDisplayMode = MaskMode.IncludeLiterals;
editorSettings.Format = "nn mi\\n. nn sec.";
editorSettings.DataType = typeof(DateTime);

editor = new EditorWithMask(new DefaultEditorOwner(editorSettings));

e.Row.Cells["Value"].Editor = editor;

 

ANY HELP would be greatly appreciated!

Thanks,

Kent 

 

Parents Reply Children
No Data