WIP
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
Imports DevExpress.XtraGrid
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DigitalData.GUIs.Common
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports ImporterShared
|
||||
|
||||
@@ -16,6 +17,11 @@ Public Class GridLoader
|
||||
.Name = pTable.Name
|
||||
}
|
||||
|
||||
Dim oInvisibleColumns As New List(Of String) From {
|
||||
"Zeilennummer",
|
||||
"BELEGKEY",
|
||||
"Infotext"
|
||||
}
|
||||
|
||||
oGrid.ForceInitialize()
|
||||
oGrid.MainView.PopulateColumns()
|
||||
@@ -25,18 +31,33 @@ Public Class GridLoader
|
||||
oView.OptionsBehavior.Editable = False
|
||||
|
||||
For Each oCol In pTable.Columns
|
||||
Dim oVisibleIndex As Integer = 0
|
||||
|
||||
' Hide certain columns
|
||||
If oInvisibleColumns.Contains(oCol.Name) Then
|
||||
oVisibleIndex = -1
|
||||
End If
|
||||
|
||||
Dim oColumn = New Columns.GridColumn With {
|
||||
.Name = oCol.Name,
|
||||
.Caption = oCol.Name,
|
||||
.FieldName = oCol.Name,
|
||||
.UnboundType = GetColumnType(oCol),
|
||||
.VisibleIndex = 0
|
||||
.VisibleIndex = oVisibleIndex
|
||||
}
|
||||
|
||||
oView.Columns.Add(oColumn)
|
||||
|
||||
Next
|
||||
|
||||
oView.BestFitColumns()
|
||||
|
||||
Dim oGridBuilder As New GridBuilder(oView)
|
||||
oGridBuilder.
|
||||
WithDefaults().
|
||||
WithReadOnlyOptions().
|
||||
WithClipboardHandler()
|
||||
|
||||
Return oGrid
|
||||
End Function
|
||||
|
||||
|
||||
Reference in New Issue
Block a user