Class GridModelCutPaste
This class manages cut-copy-paste operations for the grid
Implements
Inherited Members
Namespace: Syncfusion.Windows.Controls.Grid
Assembly: Syncfusion.Grid.Wpf.dll
Syntax
public class GridModelCutPaste : NonFinalizeDisposable, IDisposable
Remarks
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 |
---|
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 |
|
CutFlag
Specifies whether the current operation is clipboard-cut.
Declaration
public bool CutFlag { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Model
Gets or sets the grid model.
Declaration
public GridModel Model { get; set; }
Property Value
Type |
---|
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 |
---|
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 |
---|
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
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()