We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Delete confirmation for a row in datagrid

Thread ID:

Created:

Updated:

Platform:

Replies:

2236 Dec 23,2002 12:40 PM UTC Feb 2,2003 08:09 PM UTC WinForms 2
loading
Tags: FAQ
Oussax
Asked On December 23, 2002 12:40 PM UTC

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?

Administrator [Syncfusion]
Replied On 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?

ggron
Replied On February 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? >

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;