C# Class SourceGrid.RangeData

Datei anzeigen Open project: zhuangyy/Motion Class Usage Examples

Public Methods

Method Description
ClipboardGetData ( ) : RangeData

Get a RangeData object from the clipboard. Return null if the clipboard doesn't contains valid data formats.

ClipboardSetData ( RangeData rangeData ) : void

Copy the specified RangeData object the the clipboard

FindDestinationRange ( GridVirtual destinationGrid, Position dropDestination ) : Range

Calculate the destination range for the drop or paste operations.

LoadData ( GridVirtual sourceGrid, Range sourceRange, Position startDragPosition, CutMode cutMode ) : void

Load the specified range data into a string array. This method use the cell editor to get the value.

LoadData ( string data ) : void

Load the data from a Tab delimited string of data. Each column is separated by a Tab and each row by a LineFeed character.

WriteData ( GridVirtual destinationGrid, Range destinationRange ) : void

Write the current loaded array string in the specified grid range. This method use the cell editor to set the value.

Protected Methods

Method Description
DataToString ( string values, Range range ) : string

Convert a range and an array of string into a string. Normally using a tab delimited for columns and a LineFeed for rows.

StringToData ( string data, Range &range, string &values ) : void

Convert a string buffer into a Range object and an array of string.

Private Methods

Method Description
RangeData ( ) : System

Static constructor

Method Details

ClipboardGetData() public static method

Get a RangeData object from the clipboard. Return null if the clipboard doesn't contains valid data formats.
public static ClipboardGetData ( ) : RangeData
return RangeData

ClipboardSetData() public static method

Copy the specified RangeData object the the clipboard
public static ClipboardSetData ( RangeData rangeData ) : void
rangeData RangeData
return void

DataToString() protected method

Convert a range and an array of string into a string. Normally using a tab delimited for columns and a LineFeed for rows.
protected DataToString ( string values, Range range ) : string
values string
range Range
return string

FindDestinationRange() public method

Calculate the destination range for the drop or paste operations.
public FindDestinationRange ( GridVirtual destinationGrid, Position dropDestination ) : Range
destinationGrid GridVirtual
dropDestination Position
return Range

LoadData() public method

Load the specified range data into a string array. This method use the cell editor to get the value.
public LoadData ( GridVirtual sourceGrid, Range sourceRange, Position startDragPosition, CutMode cutMode ) : void
sourceGrid GridVirtual
sourceRange Range
startDragPosition Position Starting drag position. Used only for calculating drop destination range.
cutMode CutMode Cut mode. Can be used to remove the data from the source when pasting it to the destination or immediately.
return void

LoadData() public method

Load the data from a Tab delimited string of data. Each column is separated by a Tab and each row by a LineFeed character.
public LoadData ( string data ) : void
data string
return void

StringToData() protected method

Convert a string buffer into a Range object and an array of string.
protected StringToData ( string data, Range &range, string &values ) : void
data string
range Range
values string
return void

WriteData() public method

Write the current loaded array string in the specified grid range. This method use the cell editor to set the value.
public WriteData ( GridVirtual destinationGrid, Range destinationRange ) : void
destinationGrid GridVirtual
destinationRange Range
return void