Compare commits
2 Commits
538e2fcde1
...
6936d45209
| Author | SHA1 | Date | |
|---|---|---|---|
| 6936d45209 | |||
| 7173c89b77 |
@@ -82,7 +82,7 @@ Public Class GridBuilder
|
||||
ToList()
|
||||
|
||||
For Each oDateCol In oDateColumns
|
||||
SetDateTimeColumn(oDateCol)
|
||||
SetDateTimeColumn(oDateCol, "g")
|
||||
Next
|
||||
End Sub
|
||||
|
||||
@@ -96,19 +96,61 @@ Public Class GridBuilder
|
||||
ToList()
|
||||
|
||||
For Each oDateCol In oDateColumns
|
||||
SetDateTimeColumn(oDateCol)
|
||||
SetDateTimeColumn(oDateCol, "g")
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub SetDateTimeColumn(pColumn As GridColumn)
|
||||
''' <summary>
|
||||
''' Applies a proper datetime format string to all columns of the view.
|
||||
''' </summary>
|
||||
''' <remarks>The view's columns need to be loaded for this to work!</remarks>
|
||||
Public Sub SetDateTimeColumns(pView As GridView, pFormatString As String)
|
||||
If pView.Columns Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim oDateColumns = pView.Columns.AsEnumerable.
|
||||
Where(Function(column As GridColumn) column.ColumnType = GetType(Date)).
|
||||
ToList()
|
||||
|
||||
For Each oDateCol In oDateColumns
|
||||
SetDateTimeColumn(oDateCol, pFormatString)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Sub SetDateTimeColumns(pTreeList As TreeList, pFormatString As String)
|
||||
If pTreeList.Columns Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim oDateColumns = pTreeList.Columns.AsEnumerable.
|
||||
Where(Function(column As TreeListColumn) column.ColumnType = GetType(Date)).
|
||||
ToList()
|
||||
|
||||
For Each oDateCol In oDateColumns
|
||||
SetDateTimeColumn(oDateCol, pFormatString)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub SetDateTimeColumn(pColumn As GridColumn, pFormatString As String)
|
||||
|
||||
If String.IsNullOrEmpty(pFormatString) Then
|
||||
pFormatString = "g"
|
||||
End If
|
||||
|
||||
pColumn.DisplayFormat.FormatType = FormatType.Custom
|
||||
pColumn.DisplayFormat.FormatString = "g"
|
||||
pColumn.DisplayFormat.FormatString = pFormatString
|
||||
pColumn.DisplayFormat.Format = DateTimeFormatInfo.CurrentInfo
|
||||
End Sub
|
||||
|
||||
Private Sub SetDateTimeColumn(pColumn As TreeListColumn)
|
||||
Private Sub SetDateTimeColumn(pColumn As TreeListColumn, pFormatString As String)
|
||||
|
||||
If String.IsNullOrEmpty(pFormatString) Then
|
||||
pFormatString = "g"
|
||||
End If
|
||||
|
||||
pColumn.Format.FormatType = FormatType.Custom
|
||||
pColumn.Format.FormatString = "g"
|
||||
pColumn.Format.FormatString = pFormatString
|
||||
pColumn.Format.Format = DateTimeFormatInfo.CurrentInfo
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyCompany("Digital Data GmbH, Heuchelheim")>
|
||||
<Assembly: AssemblyProduct("DigitalData.Common")>
|
||||
<Assembly: AssemblyCopyright("")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: AssemblyTrademark("2.7.1.0")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.7.0.0")>
|
||||
<Assembly: AssemblyFileVersion("2.7.0.0")>
|
||||
<Assembly: AssemblyVersion("2.7.1.0")>
|
||||
<Assembly: AssemblyFileVersion("2.7.1.0")>
|
||||
|
||||
Reference in New Issue
Block a user