WPF

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridModelCutPaste - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridModelCutPaste

    This class manages cut-copy-paste operations for the grid

    Inheritance
    System.Object
    NonFinalizeDisposable
    GridModelCutPaste
    Implements
    System.IDisposable
    Inherited Members
    NonFinalizeDisposable.Dispose()
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Controls.Grid
    Assembly: Syncfusion.Grid.Wpf.dll
    Syntax
    public class GridModelCutPaste : NonFinalizeDisposable, IDisposable
    Remarks

    You access this class from a grid with the CutPaste property of a GridModel instance.

    Constructors

    GridModelCutPaste(GridModel)

    Initializes a new GridModelCutPaste.

    Declaration
    public GridModelCutPaste(GridModel model)
    Parameters
    Type Name Description
    GridModel model

    The grid model.

    Properties

    CellData

    Declaration
    public GridCellData CellData { get; }
    Property Value
    Type Description
    GridCellData

    CutCell

    Specifies whether the current operation is clipboard-cut and whether to cut the cell text along with its style.

    Declaration
    public bool CutCell { get; set; }
    Property Value
    Type Description
    System.Boolean

    True, if the current operation is clipboard-cut and the CopyPaste option is CutCell; false otherwise.

    CutFlag

    Specifies whether the current operation is clipboard-cut.

    Declaration
    public bool CutFlag { get; set; }
    Property Value
    Type Description
    System.Boolean

    True, if the current operation is clipboard-cut; false otherwise.

    Model

    Gets or sets the grid model.

    Declaration
    public GridModel Model { get; set; }
    Property Value
    Type Description
    GridModel

    Methods

    CanCopy()

    Checks if there are selected ranges that can be copied to clipboard or if the current cell's contents can be copied.

    Declaration
    public bool CanCopy()
    Returns
    Type Description
    System.Boolean

    True if there is information available to be copied to clipboard.

    CanCut()

    Checks if there are selected ranges that can be cut and copied to clipboard or if the current cell's contents can be cut and copied.

    Declaration
    public bool CanCut()
    Returns
    Type Description
    System.Boolean

    CanPaste()

    Checks if there is information on the clipboard that can be pasted into the grid.

    Declaration
    public bool CanPaste()
    Returns
    Type Description
    System.Boolean

    Call this method for example to enable or gray out menu commands like "Paste Cells".

    Copy()

    Copies the contents of cells in selected to clipboard and the current cell's contents.

    Declaration
    public void Copy()

    CopyCellsToDataObject(GridRangeInfoList, Boolean)

    Creates a object and initializes it with style objects and covered cell information of a range of cells in the grid.

    Declaration
    public GridCellData CopyCellsToDataObject(GridRangeInfoList rangeList, bool clear)
    Parameters
    Type Name Description
    GridRangeInfoList rangeList

    contains the currently selected range

    System.Boolean clear
    Returns
    Type Description
    GridCellData

    CopyRange(GridRangeInfoList, Boolean, Boolean)

    Copies the contents of a specified range of cells to clipboard.

    Declaration
    public void CopyRange(GridRangeInfoList rangeList, bool clear, bool copy)
    Parameters
    Type Name Description
    GridRangeInfoList rangeList

    contains the currently selected range list

    System.Boolean clear
    System.Boolean copy

    Cut()

    Cuts and copies the contents of cells in selected to clipboard and the current cell's contents.

    Declaration
    public void Cut()

    CutRange(GridRangeInfoList)

    Cuts and copies the contents of a specified range of cells to clipboard.

    Declaration
    public void CutRange(GridRangeInfoList rangeList)
    Parameters
    Type Name Description
    GridRangeInfoList rangeList

    contains the currently selected range list

    Dispose(Boolean)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Overrides
    NonFinalizeDisposable.Dispose(Boolean)

    OnPasteFromClipboard(GridRangeInfoList, IDataObject)

    Get The DataObject From the Clipboard

    Declaration
    public void OnPasteFromClipboard(GridRangeInfoList range, IDataObject data)
    Parameters
    Type Name Description
    GridRangeInfoList range
    System.Windows.IDataObject data

    Paste()

    Paste information from the clipboard into the grid at the current selected range or current cell.

    Declaration
    public void Paste()

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved