Datagrid eats delete key

Mar 9, 2009 at 4:01 PM
I like to do some custom action when the user presses the delete key in the datagrid.

Currently the datagrid just eats  (handles) trhe key even when UserCanDeleteRows is false.

There's also no event Deleting as for all the other commands.

How can I capture the delete onkeydown or executed event?

Regards,

Dave
Mar 9, 2009 at 4:08 PM
Try using the PreviewKeyDown event. This event occurs before the delete execution.

Evan
Mar 9, 2009 at 4:50 PM

Evan,

Works perfectly...

Any Idea how I can have a cell in editing mode when I select it?

So just on click instead of:  click selecting it, click in editing mode….

Thanks,

Dave

From: EvanShrub [mailto:notifications@codeplex.com]
Sent: maandag 9 maart 2009 16:08
To: Dave Wils
Subject: Re: Datagrid eats delete key [wpf:49619]

From: EvanShrub

Try using the PreviewKeyDown event. This event occurs before the delete execution.

Evan

Read the full discussion online.

To add a post to this discussion, reply to this email (wpf@discussions.codeplex.com)

To start a new discussion for this project, email wpf@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Coordinator
Mar 9, 2009 at 7:12 PM
I think this is what you want http://wpf.codeplex.com/Wiki/View.aspx?title=Single-Click%20Editing&referringTitle=Tips%20%26%20Tricks