menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridModelTextDataExchange - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridModelTextDataExchange

    Implements the functionalities that 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
    System.Object
    NonFinalizeDisposable
    GridModelBound
    GridModelTextDataExchange
    Implements
    System.IDisposable
    Inherited Members
    GridModelBound.Dispose(Boolean)
    GridModelBound.Model
    GridModelBound.OnModelDeserialization(Object, GridModel)
    GridModelBound.SetModelInt(GridModel)
    NonFinalizeDisposable.Dispose()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Forms.Grid
    Assembly: Syncfusion.Grid.Windows.dll
    Syntax
    public class GridModelTextDataExchange : GridModelBound, IDisposable

    Constructors

    GridModelTextDataExchange(GridModel)

    Initializes a new instance of GridModelStyleDataExchange class and associates it with a GridModel.

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

    A reference to the parent GridModel.

    Properties

    ExportTabDelim

    Gets or sets that is used for separating columns when exporting text file.

    Declaration
    public string ExportTabDelim { get; set; }
    Property Value
    Type
    System.String

    ImportTabDelim

    Gets or sets the character that is used for separating columns when importing text file.

    Declaration
    public string ImportTabDelim { get; set; }
    Property Value
    Type
    System.String

    Methods

    CalcBufferDimension(String, out Int32, out Int32)

    Determines the number of rows and columns in a tab-delimited string buffer.

    Declaration
    public bool CalcBufferDimension(string psz, out int nRows, out int nCols)
    Parameters
    Type Name Description
    System.String psz

    The tab-delimited string buffer.

    System.Int32 nRows

    A placeholder where the calculated number of rows is returned.

    System.Int32 nCols

    A placeholder where the calculated number of columns is returned.

    Returns
    Type Description
    System.Boolean

    True if the passed in buffer is a valid tab-delimited text; False otherwise.

    CopyTextToBuffer(out String, GridRangeInfoList, out Int32, out Int32)

    Determines whether to copy the text to buffer. Creates a System.String object and initializes it with style objects and covered cell information of a range of cells in the grid.

    Declaration
    public bool CopyTextToBuffer(out string buffer, GridRangeInfoList rangeList, out int nRowsDone, out int nColsDone)
    Parameters
    Type Name Description
    System.String buffer

    A placeholder for the string buffer that is created by the method.

    GridRangeInfoList rangeList

    The list with range of cells to be copied.

    System.Int32 nRowsDone

    A placeholder where the number of copied rows is returned.

    System.Int32 nColsDone

    A placeholder where the number of copied columns is returned.

    Returns
    Type Description
    System.Boolean

    True if the operation completed successfully; False otherwise.

    CreateTableFromCVSBuffer(String, out Int32, out Int32, OperationFeedback)

    Creates an ArrayList of rows where each row is an ArrayList of values that belong to that row from a tab-delimited input string.

    Declaration
    public ArrayList CreateTableFromCVSBuffer(string psz, out int nRows, out int nCols, OperationFeedback op)
    Parameters
    Type Name Description
    System.String psz

    Tab separated values as string. Newline characters indicate a new row.

    System.Int32 nRows

    The number of rows extracted from the string.

    System.Int32 nCols

    The number of columns extracted from the string

    OperationFeedback op

    An OperationFeedback object.

    Returns
    Type Description
    System.Collections.ArrayList

    The resulting ArrayList with rows and values for each row.

    PasteTextFromBuffer(String, GridRangeInfo, Int32)

    Determines whether to paste text from a string buffer with tab-delimited text into a range of cells.

    Declaration
    public bool PasteTextFromBuffer(string psz, GridRangeInfo range, int dragDropFlags)
    Parameters
    Type Name Description
    System.String psz

    The string buffer with tab-delimited cell's text.

    GridRangeInfo range

    The destination range where text should be pasted.

    System.Int32 dragDropFlags

    GridDragDropFlags options let you specify if rows or columns can be appended. See NoAppendRows and NoAppendCols of the GridDragDropFlags class.

    Returns
    Type Description
    System.Boolean

    True if operation completed successfully; False otherwise.

    PasteTextRowCol(Int32, Int32, String)

    Determines whether the text could be pasted. Raises a PasteCellText event and calls GridStyleInfo.ApplyFormattedText for the specific cell.

    Declaration
    public bool PasteTextRowCol(int rowIndex, int colIndex, string text)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    System.String text

    The text to be pasted.

    Returns
    Type Description
    System.Boolean

    True if text could be pasted; False otherwise.

    Implements

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