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
[email protected]
> 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?
>