Monorepo/LookupGrid/GridHandler.vb
2018-10-12 16:17:18 +02:00

22 lines
561 B
VB.net

Imports System.Windows.Forms
Imports DevExpress.XtraGrid.Views.Grid
Namespace LookupGrid
Public Class GridHandler
Inherits Handler.GridHandler
Public Sub New(ByVal gridView As GridView)
MyBase.New(gridView)
End Sub
Protected Overrides Sub OnKeyDown(ByVal e As KeyEventArgs)
MyBase.OnKeyDown(e)
If e.KeyData = Keys.Delete AndAlso View.State = GridState.Normal Then
View.DeleteRow(View.FocusedRowHandle)
End If
End Sub
End Class
End Namespace