WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridCurrencyTextBoxCellModel - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridCurrencyTextBoxCellModel

    Implements the data / model part for a Currency cell.

    Inheritance
    System.Object
    NonFinalizeDisposable
    Disposable
    GridCellModelBase
    GridStaticCellModel
    GridCurrencyTextBoxCellModel
    Implements
    System.Runtime.Serialization.ISerializable
    System.IDisposable
    Inherited Members
    GridStaticCellModel.GetObjectData(SerializationInfo, StreamingContext)
    GridStaticCellModel.OnQueryPrefferedClientSize(Graphics, Int32, Int32, GridStyleInfo, GridQueryBounds)
    GridStaticCellModel.OnQueryCanMergeCell(Int32, Int32, GridStyleInfo, GridMergeCellDirection)
    GridStaticCellModel.OnQueryCanFloatCell(Int32, Int32, GridStyleInfo, GridQueryFloatCell)
    GridStaticCellModel.AllowFloating
    GridStaticCellModel.AllowMerging
    GridCellModelBase.Dispose()
    GridCellModelBase.OnBindingContextChanged(EventArgs)
    GridCellModelBase.GetLocalizedString(String)
    GridCellModelBase.OnModelDeserialization(Object, GridModel)
    GridCellModelBase.CreateCopy(GridModel)
    GridCellModelBase.SubtractBorders(Rectangle, GridStyleInfo, Boolean)
    GridCellModelBase.SubtractBorders(Rectangle, GridStyleInfo)
    GridCellModelBase.CalculatePreferredCellSize(Graphics, Int32, Int32, GridStyleInfo, GridQueryBounds)
    GridCellModelBase.MeasureSampleWString(Graphics, Font)
    GridCellModelBase.GetCellSize(Int32, Int32)
    GridCellModelBase.GetCellClientSize(Int32, Int32, GridStyleInfo)
    GridCellModelBase.GetFormattedOrActiveTextAt(Int32, Int32, GridStyleInfo)
    GridCellModelBase.SetActiveText(Int32, Int32, String)
    GridCellModelBase.GetActiveText(Int32, Int32)
    GridCellModelBase.OnActiveTextChanged(GridCellEventArgs)
    GridCellModelBase.ResetActiveText(Int32, Int32)
    GridCellModelBase.GetPropertyDescriptor(GridStyleInfo)
    GridCellModelBase.GetTypeConverter(GridStyleInfo)
    GridCellModelBase.IsDisposing
    GridCellModelBase.IsDisposed
    GridCellModelBase.ForceCoveredCellFullBounds
    GridCellModelBase.BindingContext
    GridCellModelBase.Description
    GridCellModelBase.SerializeSchemeVersion
    GridCellModelBase.Grid
    GridCellModelBase.ButtonBarSize
    GridCellModelBase.MeasureEmptyCellString
    GridCellModelBase.ActiveTextChanged
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms.Grid
    Assembly: Syncfusion.Grid.Windows.dll
    Syntax
    public class GridCurrencyTextBoxCellModel : GridStaticCellModel, ISerializable, IDisposable
    Remarks

    You typically access cell models through the CellModels property of the GridModel class.

    A GridCurrencyTextBoxCellModel can serve as model for several GridCurrencyTextBoxCellRenderer instances if there are several GridControlBase views for a GridModel.

    See GridCurrencyTextBoxCellRenderer for more detailed information about this cell type.

    Constructors

    GridCurrencyTextBoxCellModel(GridModel)

    Initializes a new GridCurrencyTextBoxCellModel object and stores a reference to the GridModel this cell belongs to.

    Declaration
    public GridCurrencyTextBoxCellModel(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.

    GridCurrencyTextBoxCellModel(SerializationInfo, StreamingContext)

    Initializes a new GridCurrencyTextBoxCellModel from a serialization stream.

    Declaration
    protected GridCurrencyTextBoxCellModel(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    An object that holds all the data needed to serialize or de_serialize this instance.

    System.Runtime.Serialization.StreamingContext context

    Describes the source and destination of the serialized stream specified by info.

    Properties

    ValidateNumberDuringCellPaste

    Gets or sets a value indicating whether Clipboard text is validated before a paste.

    Declaration
    public bool ValidateNumberDuringCellPaste { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    If ValidateNumberDuringCellPaste is true, then when a paste operation is preformed on an active cell, the paste will only be attempted if the text on the Clipboard is valid.

    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

    Style information for the cell.

    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
    GridCellModelBase.ApplyFormattedText(GridStyleInfo, String, Int32)

    ApplyText(GridStyleInfo, String)

    Parses the text and converts it into a cell value to be stored in the style object (ignoring any Format settings). CultureInfo.CurrentText is used for parsing the string.

    Declaration
    public override bool ApplyText(GridStyleInfo style, string text)
    Parameters
    Type Name Description
    GridStyleInfo style

    The GridStyleInfo object that holds cell information.

    System.String text

    The input text to be parsed.

    Returns
    Type Description
    System.Boolean

    True if value was parsed correctly and saved in style object as CellValue; False otherwise.

    Overrides
    GridCellModelBase.ApplyText(GridStyleInfo, String)

    CreateRenderer(GridControlBase)

    Creates cell renderer.

    Declaration
    public override GridCellRendererBase CreateRenderer(GridControlBase control)
    Parameters
    Type Name Description
    GridControlBase control
    Returns
    Type Description
    GridCellRendererBase

    Currency TextBox cell renderer.

    Overrides
    GridStaticCellModel.CreateRenderer(GridControlBase)

    Dispose(Boolean)

    Set null value for currencyTextBox.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    true to release both managed and unmanaged resources; false to release only unmanaged resources.

    Overrides
    NonFinalizeDisposable.Dispose(Boolean)
    Remarks

    See the documentation for the System.ComponentModel.Component class and its Dispose member.

    GetDisplayTextAndColor(GridStyleInfo, Object, out Color)

    Returns the text as it is displayed in the cell (without '-' sign) and also the text color.

    Declaration
    public string GetDisplayTextAndColor(GridStyleInfo style, object value, out Color textColor)
    Parameters
    Type Name Description
    GridStyleInfo style

    The style information.

    System.Object value

    The value.

    System.Drawing.Color textColor

    Returns the text color for the cell (depending on whether value is negative or positive).

    Returns
    Type Description
    System.String

    The text as it is displayed in the cell.

    GetFormattedText(GridStyleInfo, Object, Int32)

    This is called from GridStyleInfo.GetFormattedText.

    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.

    Overrides
    GridCellModelBase.GetFormattedText(GridStyleInfo, Object, Int32)

    GetText(GridStyleInfo, Object)

    This is called from GridStyleInfo.GetText (ignoring any Format settings).

    Declaration
    public override string GetText(GridStyleInfo style, object value)
    Parameters
    Type Name Description
    GridStyleInfo style

    The GridStyleInfo object that holds cell information.

    System.Object value

    The value to convert to a string.

    Returns
    Type Description
    System.String

    The string that represents the given value.

    Overrides
    GridCellModelBase.GetText(GridStyleInfo, Object)

    InitCurrencyEditProperties(CurrencyTextBox, GridStyleInfo)

    Initializes a CurrencyTextBox with information supplied by a GridStyleInfo.

    Declaration
    public static void InitCurrencyEditProperties(CurrencyTextBox mb, GridStyleInfo style)
    Parameters
    Type Name Description
    CurrencyTextBox mb

    The control to be initialized.

    GridStyleInfo style

    The style with settings to be applied.

    Implements

    System.Runtime.Serialization.ISerializable
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved