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?
Asked
Active
Viewed 357 times
1

Renat Zamaletdinov
- 1,210
- 1
- 21
- 36
-
The control is ReadOnly. And I select a row, not a cell, after that grid is closed, and zeros appear in editor. – Renat Zamaletdinov Apr 15 '14 at 15:58
-
It is the same issue. I think it is a matter of mask types. Try doing the same trick as the one in the answer for your GridLookUpEdit editor. – Fares Apr 16 '14 at 08:14
1 Answers
2
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.

Fares
- 542
- 1
- 7
- 17