Class GridRichTextBoxCellModel
Implements the data / model part for a rich text cell.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridRichTextBoxCellModel : GridCellModelBase, ISerializable, IDisposable
Remarks
You typically access cell models through the CellModels property of the GridModel class.
A GridRichTextBoxCellModel can serve as model for several GridRichTextBoxCellRenderer instances if there are several GridControlBase views for a GridModel.
See GridRichTextBoxCellRenderer for more detailed information about this cell type.
Constructors
GridRichTextBoxCellModel(GridModel)
Initializes a new GridRichTextBoxCellModel object and stores a reference to the GridModel this cell belongs to.
Declaration
public GridRichTextBoxCellModel(GridModel grid)
Parameters
| Type | Name | Description |
|---|---|---|
| GridModel | grid | The GridModel for this cell model. |
Remarks
You typically access cell models through the CellModels property of the GridModel class.
GridRichTextBoxCellModel(SerializationInfo, StreamingContext)
Initializes a new GridRichTextBoxCellModel from a serialization stream.
Declaration
protected GridRichTextBoxCellModel(SerializationInfo info, StreamingContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Runtime.Serialization.SerializationInfo | info | An object that holds all the data needed to serialize or deserialize this instance. |
| System.Runtime.Serialization.StreamingContext | context | Describes the source and destination of the serialized stream specified by info. |
Methods
ApplyFormattedText(GridStyleInfo, String, Int32)
Parses the display text and converts it into a cell value to be stored in the style object. GridStyleInfo.CultureInfo is used for parsing the string.
Declaration
public override bool ApplyFormattedText(GridStyleInfo style, string text, int textInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| GridStyleInfo | style | The GridStyleInfo object that holds cell information. |
| System.String | text | The input text to be parsed. |
| System.Int32 | textInfo | TextInfo is a hint of who is calling, default is GridCellBaseTextInfo.DisplayText |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if value was parsed correctly and saved in style object as CellValue; False otherwise. |
Overrides
CreateRenderer(GridControlBase)
Creates a renderer for this cell model that is specific to the GridControlBase.
Declaration
public override GridCellRendererBase CreateRenderer(GridControlBase control)
Parameters
| Type | Name | Description |
|---|---|---|
| GridControlBase | control | The GridControlBase the cell renderer is created for. |
Returns
| Type | Description |
|---|---|
| GridCellRendererBase | A new GridRichTextBoxCellRenderer specific for a GridControlBase. |
Overrides
Remarks
You must override this method in your implementation of GridCellModelBase.
GetFormattedText(GridStyleInfo, Object, Int32)
This is called from GridStyleInfo.GetFormattedText. GridStyleInfo.CultureInfo is used for conversion to string.
Declaration
public override string GetFormattedText(GridStyleInfo style, object value, int textInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| GridStyleInfo | style | The GridStyleInfo object that holds cell information. |
| System.Object | value | The value to format. |
| System.Int32 | textInfo | TextInfo is a hint of who is calling, default is GridCellBaseTextInfo.DisplayText. |
Returns
| Type | Description |
|---|---|
| System.String | The formatted text for the given value. |