I just want to display both date and time in a column, not just the date. The problems is the same as this: http://www.devexpress.com/Support/Center/p/Q141539.aspx but I'm using WinForms not aspx. So I don't have PropertiesDateEdit, and DisplayFormat is read only. What syntax should I use?
Logically it should be:
view.Columns[Tables.Maintenance.Time.Title].Properties.DisplayFormat = "g";
but this doesn't work, there is no 'Properties' property.
DateTime format in grid column
Answers
Hi Christopher,
Thank you for your question.
To accomplish this task, set the GridColumn.DisplayFormat.FormatType property to the FormatType.DateTime value and use the following format string: "g". I suggest you refer to the Formatting Cell Values topic for more details. I have created a sample project to demonstrate this approach in action. Please let us know whether or not this solution meets your requirements. If not, feel free to reactivate this ticket.
Thank you,
Pavel.