menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Interface IDataGridClipboardController - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Interface IDataGridClipboardController

    Provides the functionality of clipboard operations in SfDataGrid.

    Namespace: Syncfusion.WinForms.DataGrid.Interactivity
    Assembly: Syncfusion.SfDataGrid.WinForms.dll
    Syntax
    public interface IDataGridClipboardController
    Examples

    The following example shows how to replace the IDataGridClipboardController.

    // Assign the custom IDataGridClipboardController to ClipboardController.
    sfDataGrid1.ClipboardController = new CustomGridClipboardController();
    // Implementation for custom IDataGridClipboardController.
    public class CustomGridClipboardController : IDataGridClipboardController
     {
       public void Copy()
       {
       }
    
       public void Cut()
       {
       }
    
       public void Paste()
       {
       }
    
       public void CopyRowsToClipboard(int startRecordIndex, int endRecordIndex)
       {
       }
     }

    Methods

    Copy()

    Copies the selected rows or cells from SfDataGrid to clipboard.

    Declaration
    void Copy()

    CopyRowsToClipboard(Int32, Int32)

    Copies the rows to clipboard for the specified start and end of the record index.

    Declaration
    void CopyRowsToClipboard(int startRecordIndex, int endRecordIndex)
    Parameters
    Type Name Description
    System.Int32 startRecordIndex

    The start index of the record to copy rows to clipboard.

    System.Int32 endRecordIndex

    The end index of the record to copy rows to clipboard.

    Cut()

    Copies the selected rows or cells and sets the default or null or empty value.

    Declaration
    void Cut()

    Paste()

    Pastes the clipboard copied content to the selected rows or cells in SfDataGrid.

    Declaration
    void Paste()
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved