This is a migrated thread and some comments may be shown as answers.

Custom Execute and CanExecute command handler

1 Answer 210 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Franziska
Top achievements
Rank 1
Franziska asked on 09 Nov 2011, 09:38 AM
Hello,

I want to implement a custom copy and paste function for all my GridViews.
Therefore I registered an application wide command binding for all RadGridView types.

var copyBinding = new CommandBinding(RadGridViewCommands.Copy, ExecuteGridViewCopyCommand,
                                                 CanExecuteGridViewCopyCommand);
CommandManager.RegisterClassCommandBinding(typeof(RadGridView), copyBinding);

However, the handlers are not executed.

Even if I do the binding directly on a GridView:

var copyBinding = new CommandBinding(RadGridViewCommands.Copy, ExecuteGridViewCopyCommand,
                                                 CanExecuteGridViewCopyCommand);
gridViewCategories.CommandBindings.Add(copyBinding);

What I am doing wrong?

Best regards,

Franziska

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 14 Nov 2011, 10:49 AM
Hello Franziska,

Please take a look at this forum thread for a reference. Is the suggested approach applicable for you scenario as well ? 
 

Greetings,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Franziska
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or