The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
First of all, thanks for the ton of information!!!!
I followed your advice in the following section trying to prevent rows from being deleted in my datagrid. It works great
EXCEPT for the first time the DEL key is pressed.
5.58 How can I put up a confirmation question when the user tries to delete a row in the datagrid by clicking on the row header and pressing the Delete key?
The following is my code. I think it is exactly like your. Is there a way to trap the first “DEL” key????
Public Class DataGrid_Custom
Inherits Windows.Forms.DataGrid
Private Const WM_KEYDOWN = &H100
Public Overrides Function PreProcessMessage(ByRef msg As System.Windows.Forms.Message) As Boolean
Dim keyCode As Keys = CType((msg.WParam.ToInt32 And Keys.KeyCode), Keys)
If msg.Msg = WM_KEYDOWN And keyCode = Keys.Delete Then
If MessageBox.Show("Delete This Row?", "Confirm Delete", MessageBoxButtons.YesNo) = DialogResult.No Then
Return True
End If
End If
Return MyBase.PreProcessMessage(msg)
End Function
End Class