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

ApplicationCommands

3 Answers 185 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Marc
Top achievements
Rank 1
Marc asked on 22 Jun 2010, 03:22 AM

I've got a ribbon with the standard Copy, Paste, Cut buttons on them. .

<telerik:RadRibbonButton Text="Cut" Size="Medium" />  
 


As soon as I assign a command the buttons disable. I would have expected it to simply use the built-in Cut command.  

<telerik:RadRibbonButton Text="Cut" Size="Medium" Command="ApplicationCommands.Cut"/> 

What I get however is a disabled Cut button. What am I missing?

3 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 24 Jun 2010, 05:13 PM
Hello Marc,

You will also need to set the CommandTarget property of the RibbonButton to set the object that the command is being executed on. Then when you select some text from that object, the button will be enabled thus allowing you to execute the Cut command.

I prepared a sample project illustrating this. Give it a try and let me know if it works for you.

Best wishes,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Stefan
Top achievements
Rank 1
answered on 27 Jan 2011, 07:06 PM
How do you set the CommandTarget to a GridView located in the Main Window from a RibbonBar (containing a Cut button) located in a UserControl that is contained by the Main Window.

Main Window
----Grid View
----User Control
--------Ribbon Bar
------------Cut Button
0
Tina Stancheva
Telerik team
answered on 01 Feb 2011, 05:49 PM
Hi Stefan,

The RadGridView doesn't support Cut scenarios. However, if you need to implement Copy and Paste from/to RadGridView, you can have a look at this article.

I also prepared a sample project where the Copy ApplicationCommand is used to implement Copy from the RadGridView following the project structure you described.

I hope this info will help you. Still, if you need more info, please let us know.

Best wishes,
Tina Stancheva
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
GridView
Asked by
Marc
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Stefan
Top achievements
Rank 1
Share this question
or