Class GridModelTextDataExchange
Manages text data exchange for the grid. Lets you copy cell text to a stream or clipboard and recreate the cell text at a later time.
Inheritance
Implements
Namespace: Syncfusion.Windows.Controls.Grid
Assembly: Syncfusion.Grid.Wpf.dll
Syntax
public class GridModelTextDataExchange : Object, IDisposable
Constructors
GridModelTextDataExchange(GridModel)
Initializes a new GridModelTextDataExchange.
Declaration
public GridModelTextDataExchange(GridModel model)
Parameters
Type | Name | Description |
---|---|---|
GridModel | model | Grid model. |
Properties
Model
Returns grid model.
Declaration
public GridModel Model { get; set; }
Property Value
Type |
---|
GridModel |
TabDelimiter
Gets or sets the character that is used for separating columns when importing text file.
Declaration
public string TabDelimiter { get; set; }
Property Value
Type |
---|
System.String |
Methods
CalcBufferDimension(String, out Int32, out Int32)
Calculates the Buffer dimentison as how many rows and cols does it required to paste.
Declaration
public virtual bool CalcBufferDimension(string psz, out int nRows, out int nCols)
Parameters
Type | Name | Description |
---|---|---|
System.String | psz | |
System.Int32 | nRows | |
System.Int32 | nCols |
Returns
Type |
---|
System.Boolean |
CopyTextToBuffer(out String, GridRangeInfoList, out Int32, out Int32, Boolean)
Copy cellvalue to the buffer
Declaration
public virtual bool CopyTextToBuffer(out string buffer, GridRangeInfoList rangeList, out int nrowsdone, out int ncolsdone, bool clear)
Parameters
Type | Name | Description |
---|---|---|
System.String | buffer | contain the formatted text for clipboard |
GridRangeInfoList | rangeList | currently selected rangeList |
System.Int32 | nrowsdone | Number of rows affected |
System.Int32 | ncolsdone | Number of columns affected |
System.Boolean | clear |
Returns
Type | Description |
---|---|
System.Boolean | returns true after successful copy the selected cell text value to the buffer |
CopyXmlToBuffer(out String, GridRangeInfoList, out Int32, out Int32, Boolean)
Copy the selected cells in XmlDocument format
Declaration
public virtual bool CopyXmlToBuffer(out string buffer, GridRangeInfoList rangeList, out int nrowsdone, out int ncolsdone, bool clear)
Parameters
Type | Name | Description |
---|---|---|
System.String | buffer | Returns the Xml content of copied ranges |
GridRangeInfoList | rangeList | currently selected rangeList |
System.Int32 | nrowsdone | Number of rows affected |
System.Int32 | ncolsdone | Number of columns affected |
System.Boolean | clear | Clear the selected ranges. |
Returns
Type | Description |
---|---|
System.Boolean | returns true after successful copy the selected cell text value to the buffer |
CutValueFromCell(Int32, Int32, Boolean)
Apply the default value to cell when Cut operation executed
Declaration
public virtual void CutValueFromCell(int rowindex, int colindex, bool clear)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowindex | Row value for the cell |
System.Int32 | colindex | Column value for the cell |
System.Boolean | clear | Clear the selected ranges. |
Dispose()
Declaration
public void Dispose()
GetCopyTextRowCol(Int32, Int32)
Get the value of the cell
Declaration
public virtual string GetCopyTextRowCol(int rowIndex, int colIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | contain the row value |
System.Int32 | colIndex | contain the column value |
Returns
Type | Description |
---|---|
System.String | the value of the cell |
PasteTextFromBuffer(String, GridRangeInfoList)
Paste Text From The Buffer
Declaration
public virtual bool PasteTextFromBuffer(string buffer, GridRangeInfoList rangeList)
Parameters
Type | Name | Description |
---|---|---|
System.String | buffer | For Holding final clipboard value |
GridRangeInfoList | rangeList | conatin the selected range |
Returns
Type | Description |
---|---|
System.Boolean | return true after fill the cell value from the buffer |
PasteTextRowCol(Int32, Int32, String)
Pastes the text value to the cell
Declaration
public virtual bool PasteTextRowCol(int rowIndex, int colIndex, string text)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | Row value for the cell |
System.Int32 | colIndex | Column value for the cell |
System.String | text | New String value for the cell |
Returns
Type | Description |
---|---|
System.Boolean | successful paste returns true |
PasteXmlFromBuffer(XmlDocument, GridRangeInfoList)
Paste the XML formatted text in Grid Control.
Declaration
public virtual bool PasteXmlFromBuffer(XmlDocument xDocument, GridRangeInfoList rangeList)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlDocument | xDocument | Xml document contains the copied data. |
GridRangeInfoList | rangeList | Current cell range to paste the copied data |
Returns
Type |
---|
System.Boolean |