Imports DevExpress.XtraGrid

Public Class ProcessManagerWidget
    Public Sub New()
        ' Dieser Aufruf ist für den Designer erforderlich.
        InitializeComponent()

        ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
        Dim oGridPatcher = New ClassControlPatcher(Of GridControl)(Me)
        oGridPatcher.
            ProcessContainer(AddressOf GridControlDefaults.DefaultGridSettings).
            ProcessContainer(AddressOf GridControlDefaults.ReadOnlyGridSettings)


    End Sub

    Public Delegate Sub RowDoubleClickedDelegate(RowView As DataRowView)
    Public Event RowDoubleClicked As RowDoubleClickedDelegate

    Public Property DataSource As DataTable
        Get
            Return GridMain.DataSource
        End Get
        Set(value As DataTable)
            GridMain.DataSource = value
        End Set
    End Property

    Private Sub ViewMain_RowClick(sender As Object, e As DevExpress.XtraGrid.Views.Grid.RowClickEventArgs) Handles ViewMain.RowClick
        If e.Clicks = 2 Then
            Dim oRow As DataRowView = ViewMain.GetRow(e.RowHandle)
            RaiseEvent RowDoubleClicked(oRow)
        End If
    End Sub
End Class
