jj 15.03 datagridview can add rows
This commit is contained in:
@@ -501,6 +501,12 @@ Public Class ClassControlCommandsUI
|
||||
Continue For
|
||||
End If
|
||||
|
||||
If TypeOf ctrl Is Windows.Forms.DataGridView Then
|
||||
Dim id As Integer = DirectCast(ctrl.Tag, ClassControlMetadata).Id
|
||||
UpdateMultipleValues(id, RecordID, CONTROL_VALUE)
|
||||
Continue For
|
||||
End If
|
||||
|
||||
Dim ValueExists = ClassDatabase.Execute_Scalar(String.Format("SELECT RECORD_ID FROM VWPMO_VALUES WHERE RECORD_ID = {0} AND CONTROL_ID = {1}", RecordID, CONTROL_ID))
|
||||
|
||||
If ValueExists Then ' Control Updaten
|
||||
@@ -654,6 +660,20 @@ Public Class ClassControlCommandsUI
|
||||
Case "ListBoxControl"
|
||||
Dim listbox As DevExpress.XtraEditors.ListBoxControl = DirectCast(ctrl, DevExpress.XtraEditors.ListBoxControl)
|
||||
Return listbox.SelectedValue
|
||||
|
||||
Case "DataGridView"
|
||||
Dim list As New List(Of String)
|
||||
Dim dgv As DataGridView = DirectCast(ctrl, DataGridView)
|
||||
|
||||
For Each row As DataGridViewRow In dgv.Rows
|
||||
Dim cell As DataGridViewCell = row.Cells(0)
|
||||
If Not IsNothing(cell.Value) Then
|
||||
list.Add(cell.Value)
|
||||
End If
|
||||
Next
|
||||
|
||||
Return String.Join(";", list)
|
||||
|
||||
Case Else
|
||||
Return Nothing
|
||||
End Select
|
||||
|
||||
Reference in New Issue
Block a user