jj 26.10 fix date columns in Format_GridColumns

This commit is contained in:
JenneJ
2016-10-26 16:28:02 +02:00
parent 62c2010139
commit 55042d0bd1

View File

@@ -212,17 +212,18 @@ Public Class ClassHelper
Public Shared Function Format_GridColumns(Primary_DT As DataTable, _ENTITYSQL As String, listcheck As List(Of String), listdate As List(Of String)) Public Shared Function Format_GridColumns(Primary_DT As DataTable, _ENTITYSQL As String, listcheck As List(Of String), listdate As List(Of String))
Try Try
Dim tbltemp As DataTable = Primary_DT.Clone() Dim tbltemp As DataTable = Primary_DT.Clone()
For Each col As String In listdate ' Nicht benötigt? Datumsspalten werden im Grid formatiert
Dim colDate As DataColumn = tbltemp.Columns(col) 'For Each col As String In listdate
If Not IsNothing(colDate) Then ' Dim colDate As DataColumn = tbltemp.Columns(col)
Try ' If Not IsNothing(colDate) Then
colDate.DataType = GetType(Date) ' Try
Catch ex As Exception ' colDate.DataType = GetType(DateTime)
' Catch ex As Exception
End Try ' End Try
End If ' End If
Next 'Next
For Each col1 As String In listcheck For Each col1 As String In listcheck
Dim collist As DataColumn = tbltemp.Columns(col1) Dim collist As DataColumn = tbltemp.Columns(col1)
If Not IsNothing(collist) Then If Not IsNothing(collist) Then