GrapeCity MultiRow Windows Forms Documentation
Copy Property
Example 


Gets an IAction value that copies selected cells' values to the clipboard.
Syntax
Public Shared ReadOnly Property Copy As IAction
Dim value As IAction
 
value = EditingActions.Copy
public static IAction Copy {get;}

Property Value

An IAction interface that represents an action that copies selected cells or rows' values to the clipboard.
Example
The following code example shows how to execute the cut, copy, and paste actions with the ContextMenuStrip. This code example is part of a larger example provided for the Section.ContextMenuStrip property.
void paste_Click(object sender, EventArgs e)
        {
            if (EditingActions.Paste.CanExecute(gcMultiRow1))
            {
                EditingActions.Paste.Execute(gcMultiRow1);
            }
        }

        void copy_Click(object sender, EventArgs e)
        {
            if (EditingActions.Copy.CanExecute(gcMultiRow1))
            {
                EditingActions.Copy.Execute(gcMultiRow1);
            }
        }

        void cut_Click(object sender, EventArgs e)
        {
            if(EditingActions.Cut.CanExecute(gcMultiRow1))
            {
                EditingActions.Cut.Execute(gcMultiRow1);
            }
        }
Private Sub paste_Click(ByVal sender As Object, ByVal e As EventArgs) Handles paste.Click
        If EditingActions.Paste.CanExecute(gcMultiRow1) Then
            EditingActions.Paste.Execute(gcMultiRow1)
        End If
    End Sub

    Private Sub copy_Click(ByVal sender As Object, ByVal e As EventArgs) Handles copy.Click
        If EditingActions.Copy.CanExecute(gcMultiRow1) Then
            EditingActions.Copy.Execute(gcMultiRow1)
        End If
    End Sub

    Private Sub cut_Click(ByVal sender As Object, ByVal e As EventArgs) Handles cut.Click
        If EditingActions.Cut.CanExecute(gcMultiRow1) Then
            EditingActions.Cut.Execute(gcMultiRow1)
        End If
    End Sub
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EditingActions Class
EditingActions Members
ShortcutKeyManager Property
IAction Interface
ActionList Class

 

 


Copyright © GrapeCity, inc. All rights reserved.