문제

I got form with GridLookUpEdit. DisplayMember type is DateTime. So I set GridLookUpEdit FormatType to DateTime and FormatString to "d". But when I select row in GridLookUpEdit, selected value is displayed with zero-time, like 15.04.2014 0:00:00. How can I avoid this thing?

도움이 되었습니까?

해결책

When you select a particular cell and if the cell is set to Editable then the cell's editor is shown. To use a particular cell editor, you have to add these lines of code :

// 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;

More info here.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top