我試圖使用下面的代碼格式化Ultragridcell
,它工作正常。標準格式化與UltragridCells中的自定義格式化
//代碼
DefaultEditorOwnerSettings editorSettings;
DateTimeEditor datetime_editor;
editorSettings = new DefaultEditorOwnerSettings()
editorSettings.DataType = typeof(DateTime);
editorSettings.MaskInput = "mm/dd/yyyy";
datetime_editor = new DateTimeEditor(new DefaultEditorOwner(editorSettings));
e.Row.Cells["DateInfo"].Editor = datetime_editor;
但是當我嘗試format
像下面的代碼,它失敗。
//代碼
DefaultEditorOwnerSettings editorSettings;
DateTimeEditor datetime_editor;
editorSettings = new DefaultEditorOwnerSettings()
editorSettings.DataType = typeof(DateTime);
editorSettings.MaskInput = "D";
datetime_editor = new DateTimeEditor(new DefaultEditorOwner(editorSettings));
e.Row.Cells["DateInfo"].Editor = datetime_editor;
是隻有custom formatting
太有限類型的工作原理與細胞或我錯了地方。
需要對此提出建議。
是否有可能從代碼中獲取這些值?以便我可以填充這些以供用戶選擇一個。 – iamCR