// Format numeric grid cells public static void FormatNumericDp( UltraGridCell cell, int decimalPlaces) { //Set mask editor for muti cell precision on numbers string strMask = ("nnnnnn" + (decimalPlaces > 0 ? "." : "")); strMask = strMask.PadRight ( (decimalPlaces + strMask.Length), Convert.ToChar("n")); var osSettings = new DefaultEditorOwnerSettings { MaskInput = strMask }; var deOwner = new DefaultEditorOwner(osSettings); var meEditor = new EditorWithMask(deOwner); cell.Editor = meEditor; }
// Format numeric grid cells public static void FormatNumericDp ( UltraGridCell cell, int decimalPlaces) { //Set mask editor for muti cell precision on numbers string strMask = ("nnnnnn" + (decimalPlaces > 0 ? "." : "")); strMask = strMask.PadRight ( (decimalPlaces + strMask.Length), Convert.ToChar("n")); var osSettings = new DefaultEditorOwnerSettings { MaskInput = strMask }; var deOwner = new DefaultEditorOwner(osSettings); var meEditor = new EditorWithMask(deOwner); cell.Editor = meEditor; }