MS ColumnWidth
This commit is contained in:
@@ -405,7 +405,7 @@ Public Class ClassControlCreator
|
||||
Return control
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateExistingGridControl(row As DataRow, columns As List(Of DD_DMSLiteDataSet.TBPM_CONTROL_TABLERow), designMode As Boolean) As GridControl
|
||||
Public Shared Function CreateExistingGridControl(row As DataRow, DT_MY_COLUMNS As DataTable, designMode As Boolean) As GridControl
|
||||
Dim oControl As GridControl = CreateBaseControl(New GridControl(), row, designMode)
|
||||
Dim oDatatable As New DataTable
|
||||
Dim oView As GridView
|
||||
@@ -450,13 +450,13 @@ Public Class ClassControlCreator
|
||||
|
||||
GridTables.Clear()
|
||||
|
||||
For Each oRow As DD_DMSLiteDataSet.TBPM_CONTROL_TABLERow In columns
|
||||
For Each oRow As DataRow In DT_MY_COLUMNS.Rows
|
||||
' Create Columns in Datatable
|
||||
|
||||
Dim oColumn = New DataColumn() With {
|
||||
.DataType = GetType(String),
|
||||
.ColumnName = oRow.SPALTENNAME,
|
||||
.Caption = oRow.SPALTEN_HEADER,
|
||||
.ColumnName = oRow.Item("SPALTENNAME"),
|
||||
.Caption = oRow.Item("SPALTEN_HEADER"),
|
||||
.ReadOnly = False
|
||||
}
|
||||
|
||||
@@ -470,9 +470,9 @@ Public Class ClassControlCreator
|
||||
If oConnectionId > 0 And oSqlCommand <> "" Then
|
||||
Try
|
||||
Dim oComboboxDataTable As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oConnectionId)
|
||||
GridTables.Add(oRow.SPALTENNAME, oComboboxDataTable)
|
||||
GridTables.Add(oRow.Item("SPALTENNAME"), oComboboxDataTable)
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn("Could not load data for column {0} in control {1}", oRow.SPALTENNAME, oControl.Name)
|
||||
LOGGER.Warn("Could not load data for column {0} in control {1}", oRow.Item("SPALTENNAME"), oControl.Name)
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
End If
|
||||
@@ -484,11 +484,20 @@ Public Class ClassControlCreator
|
||||
oControl.DataSource = oDatatable
|
||||
oControl.RefreshDataSource()
|
||||
oControl.ForceInitialize()
|
||||
Dim oGridView As GridView = oControl.DefaultView
|
||||
For Each oRow As DataRow In DT_MY_COLUMNS.Rows
|
||||
Dim o = oRow.Item("SPALTENNAME")
|
||||
Dim p = oRow.Item("SPALTENBREITE")
|
||||
Dim ocount = oGridView.Columns.Count
|
||||
|
||||
' oGridView.Columns(oRow.Item("SPALTENNAME")).Width = oRow.Item("SPALTENBREITE")
|
||||
Next
|
||||
|
||||
|
||||
AddHandler oView.CellValueChanged, AddressOf HandleCellValueChanged
|
||||
AddHandler oView.CustomRowCellEdit, Sub(sender As Object, e As CustomRowCellEditEventArgs)
|
||||
For Each oRow As DD_DMSLiteDataSet.TBPM_CONTROL_TABLERow In columns
|
||||
If oRow.SPALTENNAME = e.Column.FieldName Then
|
||||
For Each oRow As DataRow In DT_MY_COLUMNS.Rows
|
||||
If oRow.Item("SPALTENNAME") = e.Column.FieldName Then
|
||||
|
||||
If GridTables.ContainsKey(e.Column.FieldName) Then
|
||||
Dim oComboboxDataTable As DataTable = GridTables.Item(e.Column.FieldName)
|
||||
|
||||
Reference in New Issue
Block a user