Skip to main content
All docs
V25.1
  • DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

    Take the survey Not interested

    SmartPasteBehavior.SmartPasteAsync() Method

    Assigns the right values (from the clipboard) to the appropriate items.

    Namespace: DevExpress.AIIntegration.WinForms

    Assembly: DevExpress.AIIntegration.WinForms.v25.1.dll

    NuGet Package: DevExpress.AIIntegration.WinForms

    #Declaration

    public Task SmartPasteAsync()

    #Returns

    Type Description
    Task

    The task.

    #Remarks

    The following code snippet handles the GridView’s KeyDown event to invoke SmartPaste when a user presses Alt+P:

    async void GridView1_KeyDown(object sender, KeyEventArgs e) {
        if (e.KeyCode == Keys.P && e.Modifiers == Keys.Alt)
            await behaviorManager1.GetBehavior<SmartPasteBehavior>(gridView1).SmartPasteAsync();
    }
    

    Read the following help topic for additional information: Smart Paste AI-powered Extension.

    See Also