Merge branch 'master' of http://dd-vmp07-com04:3000/AppStd/ProcessManager
This commit is contained in:
@@ -426,7 +426,7 @@ Public Class ClassControlCreator
|
||||
Return control
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateExistingGridControl(row As DataRow, DT_MY_COLUMNS As DataTable, designMode As Boolean, pPanel As Panel) 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 oControlId = DirectCast(oControl.Tag, ControlMetadata).Guid
|
||||
Dim oDatatable As New DataTable
|
||||
@@ -500,11 +500,22 @@ Public Class ClassControlCreator
|
||||
' Create Columns in Datatable
|
||||
|
||||
Dim oColumn = New DataColumn() With {
|
||||
.DataType = GetType(String),
|
||||
.ColumnName = oRow.Item("SPALTENNAME"),
|
||||
.Caption = oRow.Item("SPALTEN_HEADER"),
|
||||
.ReadOnly = False
|
||||
}
|
||||
Select Case oRow.Item("TYPE_COLUMN")
|
||||
Case "TEXT"
|
||||
oColumn.DataType = GetType(String)
|
||||
Case "INTEGER"
|
||||
oColumn.DataType = GetType(Integer)
|
||||
Case "BOOLEAN"
|
||||
oColumn.DataType = GetType(Boolean)
|
||||
Case Else
|
||||
oColumn.DataType = GetType(String)
|
||||
End Select
|
||||
|
||||
|
||||
|
||||
oDatatable.Columns.Add(oColumn)
|
||||
|
||||
@@ -543,6 +554,29 @@ Public Class ClassControlCreator
|
||||
oControl.RefreshDataSource()
|
||||
oControl.ForceInitialize()
|
||||
|
||||
|
||||
If row.Item("TABLE_ORDER_COLUMN") <> String.Empty Then
|
||||
Try
|
||||
Dim oSortTerm = row.Item("TABLE_ORDER_COLUMN").ToString
|
||||
Dim oSortOrder As DevExpress.Data.ColumnSortOrder = DevExpress.Data.ColumnSortOrder.Ascending
|
||||
If oSortTerm.Contains(" ASC") Then
|
||||
oSortTerm = oSortTerm.Replace(" ASC", "")
|
||||
ElseIf oSortTerm.Contains(" DESC") Then
|
||||
oSortOrder = DevExpress.Data.ColumnSortOrder.Descending
|
||||
oSortTerm = oSortTerm.Replace(" DESC", "")
|
||||
End If
|
||||
oView.BeginDataUpdate()
|
||||
Try
|
||||
oView.ClearSorting()
|
||||
oView.Columns(oSortTerm).SortOrder = oSortOrder
|
||||
Finally
|
||||
oView.EndDataUpdate()
|
||||
End Try
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
End If
|
||||
Dim oShouldDisplayFooter As Boolean = False
|
||||
|
||||
For Each oCol As GridColumn In oView.Columns
|
||||
|
||||
Reference in New Issue
Block a user