Syncfusion.Grid.Windows
Members 


Syncfusion.Windows.Forms.Grid Namespace : GridCurrencyTextBoxCellRenderer Class

GridCurrencyTextBoxCellRenderer Class

Implements the renderer part of a currency cell that handles currency input and validation.
Object Model
GridCurrencyTextBoxCellRenderer ClassGridCurrentCell ClassGridStyleInfo ClassGridCellButton ClassIGridDropDownContainer InterfaceIGridDropDownCellImp InterfaceIGridDropDownCellImp InterfaceGridControlBase ClassGridCellModelBase ClassGridStyleInfo Class
Syntax
Remarks
The CurrencyTextBox is derived from the text box and provides all the functionality of a text box and adds additional functionality of its own.

Collecting currency input in a consistent format requires a alot of validation code that needs to be built into the application when using the Windows Forms text box control. The CurrencyTextBox includes all this logic into its methods and properties and makes it easy for the developer and the end user to collect and enter currency data.

The CurrencyTextBox is also closely tied to the globalization settings of the operating system for Currency related properties. Please refer to the System.Globalization.NumberFormatInfo class for a detailed explanation of globalization and Currency related attributes.

Use the GridStyleInfo.CurrencyEdit (GridCurrencyEditInfo) property of a GridStyleInfo to change currency edit properties for a cell.

The following table lists some characteristics about the Currency cell type:

Item Description
CellType Currency
Renderer GridCurrencyTextBoxCellRenderer
Model GridCurrencyTextBoxCellModel
XP Themes Support NA
Interactive Edit with Text Input
Control GridCurrencyTextBox
Floating Support Both
Base Type GridStaticCellRenderer

The cell's behavior and appearance can be customized with the following properties of the GridStyleInfo class:

PropertyName Description
GridStyleInfo.AutoSize (System.Boolean) Gets / sets if the cell height should automatically increase when the edited text does not fit into the cell and GridStyleInfo.WrapText is True. If GridStyleInfo.WrapText is False, GridStyleInfo.AutoSize will affect the column width. (Default: false)
GridStyleInfo.BaseStyle (System.String) The base style for this style instance with default values for properties that are not initialized for this style object. (Default: String.Empty)
GridStyleInfo.Borders (GridBordersInfo) Top, left, bottom, and right border settings. (Default: GridBordersInfo.Default)
GridStyleInfo.CellAppearance (GridCellAppearance) Specifies if cell edges shall be drawn raised, sunken, or flat (default). (Default: GridCellAppearance.Flat)
GridStyleInfo.CellTipText (System.String) ToolTip text to be displayed when user hovers mouse over cell. (Default: String.Empty)
GridStyleInfo.CellType (System.String) Currency (Default: Text Box)
GridStyleInfo.CellValue (System.Object) This property holds the cell value. Although the cell value is typically a string, it can also be any other primitive type such as int, byte, enum, or any custom type that is derived from System.Object. (Default: String.Empty)
GridStyleInfo.CellValueType (System.Type) Specifies the preferred System.Type for cell values. When you assign a value to the GridStyleInfo object, the value will be converted to this type. If the value cannot be converted, GridStyleInfo.Error will contain error information. (Default: NULL)
GridStyleInfo.CultureInfo (System.Globalization.CultureInfo) The culture information holds rules for parsing and formatting the cell's value. (Default: NULL)
GridStyleInfo.CurrencyEdit (GridCurrencyEditInfo) A nested object with currency text box properties for a cell. (Default: GridCurrencyEditInfo.Default)
GridStyleInfo.Enabled (System.Boolean) Specifies if the cell can be activated as current cell or if the cell should be skipped when moving the current cell. (Default: True)
GridStyleInfo.Error (System.String) Holds error information if a value could not be converted to the System.Type specified with GridStyleInfo.CellValueType. (Default: String.Empty)
GridStyleInfo.FloatCell (System.Boolean) Gets / sets if text can float into the boundaries of a neighboring cell. (Default: True)
GridStyleInfo.FloodCell (System.Boolean) Gets / sets if this cell can be flooded by a previous cell. (Default: True)
GridStyleInfo.Font (GridFontInfo) The font for drawing text. (Default: GridFontInfo.Default)
GridStyleInfo.Format (System.String) Gets / sets the format mask for formatting the cell value. You can specify numeric format strings, Date format strings or enumeration format strings as discussed in the section "Format Specifiers and Format Providers" of the .NET Framework Developers Guide (see ms-help://MS.VSCC/MS.MSDNVS/cpguide/html/cpconformatspecifiersformatproviders.htm). (Default: String.Empty)
GridStyleInfo.Interior (Syncfusion.Drawing.BrushInfo) Lets you specify a solid backColor, gradient, or pattern style with both back and foreColor for a cell's background. (Default: SystemColors.Window)
GridStyleInfo.MaxLength (System.Int32) Limits the number of characters the user can type into the cell. Note: When selecting a text from a choice list or when pasting text, the text can be longer. Additional validation is necessary on your side. (Default: 0)
GridStyleInfo.MergeCell (GridMergeCellDirection) Specifies merge behavior for a individual cell when merging cell's features have been enabled in a GridModel with GridModelOptions.MergeCellsMode. (Default: GridMergeCellDirection.None)
GridStyleInfo.ReadOnly (System.Boolean) Specifies if cell contents can be modified by the user. You can programmatically change Read-only cells by setting GridModel.DiscardReadOnly to True. (Default: False)
GridStyleInfo.Text (System.String) Gets / sets the value as a string. If a GridStyleInfo.CellValueType is specified, the text will be parsed and converted to the type specified with GridStyleInfo.CellValueType using any GridStyleInfo.CultureInfo information. (Default: String.Empty)
GridStyleInfo.TextColor (System.Drawing.Color) Lets you specify the color for drawing the cell text. (Default: SystemColors.WindowText)
GridStyleInfo.TextMargins (GridMarginsInfo) Holds text margins in pixels. When drawing a cell, this specifies the empty area between the text rectangle and the client rectangle of the cell without borders and cell buttons. (Default: GridMarginsInfo.Default)

Inheritance Hierarchy

System.Object
   Syncfusion.ComponentModel.NonFinalizeDisposable
      Syncfusion.Windows.Forms.Grid.GridCellRendererBase
         Syncfusion.Windows.Forms.Grid.GridStaticCellRenderer
            Syncfusion.Windows.Forms.Grid.GridCurrencyTextBoxCellRenderer

AssemblyVersion

Syncfusion.Grid.Windows: 17.1460.0.47

See Also