我正在尝试Ultragridcell
使用以下代码格式化 a 并且它工作正常。
//代码
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
只有有限的类型才能与单元格一起使用,还是我在某个地方错了。
需要这方面的建议。