"RadSpreadsheet.CommandDescriptors.Copy.IsEnabled = false" is not work.
How to disable copy and cut in spread sheet?
2 Answers, 1 is accepted
0
Nikolay Demirev
Telerik team
answered on 27 Jul 2016, 11:37 AM
Hello,
The command descriptors have internal logic for enabling and disabling the ribbon buttons. Maybe that is the reason why they can not be disabled by setting the IsEnabled property to false because after that they are enabled by the internal logic.
The Copy operation can be performed using several different inputs - RibbonButtons, Context menu, Key bindings.
If you want to disable the ribbon buttons, you could implement your custom property which can be bound to the IsEnabled property of the button. This way you will control when to enable or disable the ribbon button.
The same solution as for the Ribbon buttons is applicable for the context menu of the WorksheetEditor.
The last way copy values from the RadSpreadsheet is by the key combination Ctrl+C. You can disable it by setting empty command to the same key combination. You could use the following code snippet: