[英]How can I hide zeros in GridLookUpEdit?
我得到了 GridLookUpEdit 的表格。 DisplayMember
类型为 DateTime。 所以我将 GridLookUpEdit FormatType 设置为 DateTime 并将 FormatString 设置为"d"
。 但是,当我在 GridLookUpEdit 中选择行时,所选值以零时间显示,例如15.04.2014 0:00:00
。 我怎样才能避免这件事?
当您选择特定单元格并且该单元格设置为Editable
编辑时,将显示该单元格的编辑器。 要使用特定的单元格编辑器,您必须添加以下代码行:
// aDateColumn is the column you want to format
// Custom mask
RepositoryItemTextEdit columnEdit = new RepositoryItemTextEdit();
columnEdit.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.DateTime;
columnEdit.Mask.EditMask = "d";
aDateColumn.ColumnEdit = columnEdit;
更多信息在这里。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.