DanielDragnev
06.16.2012
-
Well custom doesn't exactly work that way (you must use brackets), but your first attempt using Datetime and "t" should have done the job... are you doing any custom painting or using the CustomColumnDisplayText event? Do you have a dedicated editor that itself isn't formatted properly?
-
No, I do not do any custom painting. I am using a standard TimeEdit as a editor. The edit mask of the editor is set to "t" and it works well.
-
I worked around the problem by handling the CustomColumnDisplayText event :
If e.Column.FieldName = "[column_name]" Then
Dim d As DateTime
If DateTime.TryParse(e.DisplayText, d) Then
e.DisplayText = d.ToString("hh:mm tt")
Else
e.DisplayText = ""
End If
End If
but it seems that there should be an easier wey.
You must
log in
or
register
to leave comments
1 Solution
Your mask must work. It is necessary to set this mask to a column that displays a time value for a detail pattern view. Please refer to the Pattern and Clone Views help topic to see how to obtain a pattern view.
If you don't manage to resolve the issue, send us a small project to illustrate how you provide data and views for the Grid.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.