Class TreeGridCutCopyPaste
This class is used to perform the cut, copy and paste operation for selected records in SfTreeGrid.
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.TreeGrid
Assembly: Syncfusion.SfGrid.UWP.dll
Syntax
public class TreeGridCutCopyPaste : Object, IDisposable
Constructors
TreeGridCutCopyPaste(SfTreeGrid)
Initializes a new instance of the TreeGridCutCopyPaste class.
Declaration
public TreeGridCutCopyPaste(SfTreeGrid treeGrid)
Parameters
Type | Name | Description |
---|---|---|
SfTreeGrid | treeGrid | The instance of SfTreeGrid. |
Fields
TreeGrid
Gets or sets an instance of SfTreeGrid .
Declaration
protected SfTreeGrid TreeGrid
Field Value
Type |
---|
SfTreeGrid |
Methods
CanConvertToType(Object, ref Type)
Determines whether the copied cell value type is compatible with type of paste cell content.
Declaration
protected bool CanConvertToType(object value, ref Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The corresponding value can be compatible with paste cell type. |
System.Type | type | Contains type of selected column. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the copied value type is compatible with paste cell value type; otherwise, false. |
ClearCell(Object, TreeGridColumn)
This method is called when the cut operation performed for the particular row data and column.
Declaration
protected virtual void ClearCell(object rowData, TreeGridColumn column)
Parameters
Type | Name | Description |
---|---|---|
System.Object | rowData | Contains the row data of the selected record to perform cut operation. |
TreeGridColumn | column | The corresponding column of the selected record to perform cut operation. |
CommitValue(Object, TreeGridColumn, Object)
To commits the value for the specified row data, column and corresponding changed value.
Declaration
protected virtual void CommitValue(object rowData, TreeGridColumn column, object changedValue)
Parameters
Type | Name | Description |
---|---|---|
System.Object | rowData | |
TreeGridColumn | column | |
System.Object | changedValue |
Copy()
Copy the selected rows from SfTreeGrid to clipboard.
Declaration
public void Copy()
Remarks
This method is invoked when the Ctrl+C key is pressed.
CopyCell(Object, TreeGridColumn, ref StringBuilder)
This method is used to copy the particular cell value for the specified record and column.
Declaration
protected virtual void CopyCell(object record, TreeGridColumn column, ref StringBuilder text)
Parameters
Type | Name | Description |
---|---|---|
System.Object | record | The corresponding node to process copy operation. |
TreeGridColumn | column | The corresponding column to copy the cell value. |
System.Text.StringBuilder | text | The corresponding copied value is append to the reference parameter. |
CopyHeaderRow(StringBuilder)
This method is called when the copy operation is performed for selected records, if you want to include the header row,
you can copy the header row by setting
Declaration
protected virtual void CopyHeaderRow(StringBuilder text)
Parameters
Type | Name | Description |
---|---|---|
System.Text.StringBuilder | text | The corresponding copied value is append to the reference parameter. |
CopyRow(Object, ref StringBuilder)
This method is called when the copy operation is performed for particular record.
Declaration
protected virtual void CopyRow(object record, ref StringBuilder text)
Parameters
Type | Name | Description |
---|---|---|
System.Object | record | The corresponding node to process copy operation. |
System.Text.StringBuilder | text | The corresponding copied value is append to the reference parameter. |
CopyRows(ObservableCollection<Object>, ref StringBuilder)
This method is called when the copy operation is processed for the specified collection of selected records.
Declaration
protected virtual void CopyRows(ObservableCollection<object> records, ref StringBuilder text)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.ObjectModel.ObservableCollection<System.Object> | records | The collection of record to process copy operation. |
System.Text.StringBuilder | text | The corresponding copied value is append to the reference parameter. |
Cut()
Copy the selected rows and sets the default or null or empty value.
Declaration
public void Cut()
Remarks
This method is invoked when the Ctrl+X key is pressed.
CutRows(ObservableCollection<Object>)
This method is called when the cut operation is performed on row selection in SfTreeGrid.
Declaration
protected virtual void CutRows(ObservableCollection<object> selections)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.ObjectModel.ObservableCollection<System.Object> | selections | Contains the collection of selected records. |
Dispose()
Disposes all the resources used by the TreeGridCutCopyPaste class.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes all the resources used by the TreeGridCutCopyPaste class.
Declaration
protected virtual void Dispose(bool isDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isDisposing | true to release all the resources. |
GetPropertyType(Object, TreeGridColumn)
Gets the corresponding property type for the specified row data and column.
Declaration
protected virtual Type GetPropertyType(object rowData, TreeGridColumn column)
Parameters
Type | Name | Description |
---|---|---|
System.Object | rowData | The corresponding row data to get property type. |
TreeGridColumn | column | The corresponding column to get property type. |
Returns
Type | Description |
---|---|
System.Type | Returns the corresponding property type. |
OnCopyingClipBoardContent(ObservableCollection<Object>, Boolean)
This method is called when the copy operation is initiated for the specified collection of records to clipboard for row selection.
Declaration
protected virtual void OnCopyingClipBoardContent(ObservableCollection<object> records, bool canCut)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.ObjectModel.ObservableCollection<System.Object> | records | The collection of records to initialize the copy operation. |
System.Boolean | canCut | Indicates whether the cut operation is perform or not. |
Paste()
Paste the clipboard copied content to the selected rows in SfTreeGrid.
Declaration
public void Paste()
Remarks
This method is invoked when the Ctrl+V key is pressed.
PasteCell(Object, TreeGridColumn, Object)
This method is used to perform the paste operation for the copied cell value to selected record cell.
Declaration
protected virtual void PasteCell(object record, TreeGridColumn column, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | record | Contains the record of the selected cell. |
TreeGridColumn | column | Contains the corresponding column of the selected cell. |
System.Object | value | Contains copied cell value to paste. |
PasteRow(Object, Object)
This method invoked when the copied row is performed to paste operation for the specified clipboard content and selected records.
Declaration
protected virtual void PasteRow(object clipboardcontent, object selectedRecords)
Parameters
Type | Name | Description |
---|---|---|
System.Object | clipboardcontent | Contains the copied record to paste row. |
System.Object | selectedRecords | Contains the selected record to paste row. |
PasteRows(Object)
This method is called when the paste operation is performed to each row of the clipboard copied rows in SfTreeGrid.
Declaration
protected virtual void PasteRows(object clipboardrows)
Parameters
Type | Name | Description |
---|---|---|
System.Object | clipboardrows | Contains the copied clipboard content to paste rows. |
PasteRowsToClipboard()
This method is called when the clipboard content is copied and perform the paste operation for row selection.
Declaration
public void PasteRowsToClipboard()
RaiseCopyContentEvent(GridCopyPasteEventArgs)
To raise the CopyContent event in SfTreeGrid.
Declaration
protected virtual GridCopyPasteEventArgs RaiseCopyContentEvent(GridCopyPasteEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
GridCopyPasteEventArgs | args | Contains the event data. |
Returns
Type | Description |
---|---|
GridCopyPasteEventArgs | Returns the GridCopyPasteEventArgs. |
RaiseCopyTreeGridCellContentEvent(TreeGridColumn, Object, Object)
To raise the CopyCellContent event in SfTreeGrid.
Declaration
protected virtual TreeGridCopyPasteCellEventArgs RaiseCopyTreeGridCellContentEvent(TreeGridColumn column, object rowData, object clipboardValue)
Parameters
Type | Name | Description |
---|---|---|
TreeGridColumn | column | The corresponding column of the cell content. |
System.Object | rowData | The corresponding row data of the cell content. |
System.Object | clipboardValue | The corresponding clipboard value that is going to be pasted. |
Returns
Type | Description |
---|---|
TreeGridCopyPasteCellEventArgs | Returns the TreeGridCopyPasteCellEventArgs. |
RaisePasteContentEvent(GridCopyPasteEventArgs)
To raise the PasteContent event in SfTreeGrid.
Declaration
protected virtual GridCopyPasteEventArgs RaisePasteContentEvent(GridCopyPasteEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
GridCopyPasteEventArgs | args | Contains the event data. |
Returns
Type | Description |
---|---|
GridCopyPasteEventArgs | Returns the GridCopyPasteEventArgs. |
RaisePasteGridCellContentEvent(TreeGridColumn, Object, Object)
To raise the PasteCellContent event in SfTreeGrid.
Declaration
protected virtual TreeGridCopyPasteCellEventArgs RaisePasteGridCellContentEvent(TreeGridColumn column, object rowData, object clipboardValue)
Parameters
Type | Name | Description |
---|---|---|
TreeGridColumn | column | The corresponding column of the cell content. |
System.Object | rowData | The corresponding row data of the cell content. |
System.Object | clipboardValue | The corresponding clipboard value that is going to be pasted. |
Returns
Type | Description |
---|---|
TreeGridCopyPasteCellEventArgs | Returns the TreeGridCopyPasteCellEventArgs. |