I don't understand why the colume doesn't change to date.
In my table there is a string Col like "20040505"
in the datagrid I want it to show "2004/05/05" or "05/05/2004"
I wrote:
Dim dgts As New DataGridTableStyle
.MappingName = dtt.TableName
For i = 0 To dtt.Columns.Count - 1
'DataGridColoredTextBoxColumn is similar to
'DataGridTextBoxColumn
ACol = New DataGridColoredTextBoxColumn
column_name = dtt.Columns(i).ColumnName
ACol.MappingName = column_name
ACol.HeaderText = column_name
If column_name = CODE Then
ACol.Width = 0
ElseIf column_name = "DateStr" Then
ACol.Format = "yyyy/MM/dd"
End If
dgts.GridColumnStyles.Add(ACol)
ACol = Nothing
Next
the code is working well except the format propery
please help!?
In my table there is a string Col like "20040505"
in the datagrid I want it to show "2004/05/05" or "05/05/2004"
I wrote:
Dim dgts As New DataGridTableStyle
.MappingName = dtt.TableName
For i = 0 To dtt.Columns.Count - 1
'DataGridColoredTextBoxColumn is similar to
'DataGridTextBoxColumn
ACol = New DataGridColoredTextBoxColumn
column_name = dtt.Columns(i).ColumnName
ACol.MappingName = column_name
ACol.HeaderText = column_name
If column_name = CODE Then
ACol.Width = 0
ElseIf column_name = "DateStr" Then
ACol.Format = "yyyy/MM/dd"
End If
dgts.GridColumnStyles.Add(ACol)
ACol = Nothing
Next
the code is working well except the format propery
please help!?