I implemented my own paste handling. Therefore I set the property RadGridView.ClipboardPasteMode to GridViewClipboardPasteMode.None. This worked perfectly for version Q3 2010. Now I update to Q2 2011. With this version my handlers of the command ApplicationCommands.Paste are not invoked any more. I noticed that now the method GridViewDataControl.PasteCanExecute contains the statemente: e.Handled = true. I think this does not make sense for GridViewClipboardPasteMode.None.
Is this a known issue? Will it be fixed? Is there a workaround?
Best regards
Uli
9 Answers, 1 is accepted
Sorry for the late reply.
The problem comes from the fact that RadGridView handles KeyDown event (ctrl + v) when any RadGridView command is performed and therefore Application.Paste command is not invoked. You can take a look this blog post for more information how to customize keyboard behavior.
Let me know if this doesn't help.
Nedyalko Nikolov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

the problem has nothing to do with key handling. There is the same behavior if I invoke the Application.Paste command via menu or toolbar. I am quite sure that the problem comes from the change in the implementation of the method GridViewDataControl.PasteCanExecute.
Regards Uli
Could you please try your scenario with our latest internal build (2011.2.0808) and let me know how it works?
Best wishes,
Nedyalko Nikolov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

it's the same behaviour with the 2011.2.0808 build.
Best regards
Uli
I'm attaching a sample project which can give you an idea how to achieve the desired behavior with our latest internal build.
Let me know if there is something unclear.
Nedyalko Nikolov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

I'm sorry, but the solution you demonstated in your sample is not acceptable for our application. We can't use a custom command but we have to use the predefined ApplicationCommands.Paste because this is supported by all standard controls. We just want that when RadGridView.ClipboardPasteMode is set to GridViewClipboardPasteMode.None that the GridView ignores this command. Just the way it has been implemented in release Q3 2010.
Best regards
Uli
Could you please send me a code snippet that demonstrates how you are using ApplicationCommands.Paste in your code?
Thank you in advance.
Nedyalko Nikolov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

in the menu of the main window I have a MenuItem bound to ApplicationCommands.Paste:
<
MenuItem
Header
=
"Paste"
Command
=
"ApplicationCommands.Paste"
>
In the constructor of the UserControl that contains the RadGridView instance I set the ClipboardPasteMode property to GridViewClipboardPasteMode.None and add a binding to the Paste command.
<P>
public
MyListView()<BR>
{<BR>
InitializeComponent();</P>
<P>
RadGridView1.ClipboardPasteMode =
GridViewClipboardPasteMode.None;<BR>
CommandBindings.Add(
new
CommandBinding(ApplicationCommands.Paste, ExecutePaste,
CanExecutePaste));<BR> }</P>
<P>
private
void
ExecutePaste(
object
sender, ExecutedRoutedEventArgs e)<BR>
{<BR>
// ...
my paste code<BR> }<BR></P>
If the keyboard focus is within the RadGridView I expect that the handler ExecutePaste is called as it has been in release Q3 2010.
Best regards
Uli
The issue will be fixed with the next latest internal build (Monday - 22 Aug).
Sorry for the inconvenience caused.
P.S. I've updated your Telerik points accordingly.
Nedyalko Nikolov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>