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.
I tried the "5.54 How can I put up a confirmation question when the user tries to delete a row in the datagrid .." but it didn't work.
the function wasn't overriden. Did someone tried it or has another way to ask a question and wait for the response of the user before deleting the datagrid row?
ADAdministrator Syncfusion Team January 17, 2003 01:39 PM UTC
try this:
Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean
If keyData = Keys.Delete Then
If IsSelected(Me.CurrentCell.RowNumber) Then
'if you don't want to process that key
Return True
'else do nothing
End If
End If
Return MyBase.ProcessCmdKey(msg, keyData)
End Function
> I tried the "5.54 How can I put up a confirmation question when the user tries to delete a row in the datagrid .." but it didn't work.
>
> the function wasn't overriden. Did someone tried it or has another way to ask a question and wait for the response of the user before deleting the datagrid row?
GGggronFebruary 2, 2003 08:09 PM UTC
The code is working fine but I want understand it. Is ProcessCmdKey a datagrid class's function ?
I don't find this function in box "method name", in VS IDE. Where is it ?
thanks!
ggron
joinus@ggron.com
> try this:
>
> Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean
>
> If keyData = Keys.Delete Then
> If IsSelected(Me.CurrentCell.RowNumber) Then
> 'if you don't want to process that key
> Return True
> 'else do nothing
> End If
> End If
>
> Return MyBase.ProcessCmdKey(msg, keyData)
> End Function
>
>
>
> > I tried the "5.54 How can I put up a confirmation question when the user tries to delete a row in the datagrid .." but it didn't work.
> >
> > the function wasn't overriden. Did someone tried it or has another way to ask a question and wait for the response of the user before deleting the datagrid row?
>