GrapeCity MultiRow Windows Forms Documentation
RichTextBoxCell

The rich text box cell has features similar to the .NET Framework's RichTextBox control (System.Windows.Forms.RichTextBox). The user can use the rich text box cell to enter formatted text into the cell.

Features

In addition to the Base Cell features, the rich text box cell can display and let users input formatted text. For more details on this feature, refer to the RichTextBoxCell class.

Data Types

The rich text box cell uses the Object type value and this type can be checked with the RichTextBoxCell.ValueType property. The value cast into a String type is used for input and display. This type can be checked with the RichTextBoxCell.FormattedValueType property. Override the RichTextBoxCell.OnCellFormatting method to modify the behavior when values are read in a cell. Override the RichTextBoxCell.OnCellParsing method to modify behavior when the value is written back from the cell.

Cell Edit Control

The rich text box cell value can be edited with the RichTextBoxEditingControl control. This control inherits from the IEditingControl interface and the System.Windows.Forms.RichTextBox class. The cell edit control type can be checked with the RichTextBoxCell.EditType property.

Styles

The rich text box cell supports the following CellStyle class members. You can set the cell style with the RichTextBoxCell.Style property.

CellStyle Members Non-Editable State Editable State
BackColor Enabled Enabled
BackgroundGradientEffect Enabled -
Border Enabled Enabled
DataSourceNullValue Enabled Enabled
DisabledBackColor Enabled -
DisabledForeColor - -
DisabledGradientEffect Enabled -
EditingBackColor - Enabled
EditingForeColor - -
Font - -
ForeColor - -
Format Enabled Enabled
FormatProvider Enabled Enabled
Image - -
ImageAlign - -
ImeMode Enabled Enabled
ImeSentenceMode Enabled Enabled
InputScope Enabled Enabled
LineAdjustment Enabled -
Margin Enabled Enabled
MouseOverBackColor Enabled -
MouseOverForeColor - -
MouseOverGradientEffect Enabled -
Multiline Enabled Enabled
NullValue Enabled Enabled
Padding Enabled Enabled
PatternColor Enabled -
PatternStyle Enabled -
SelectionBackColor Enabled -
SelectionForeColor - -
SelectionGradientEffect Enabled -
Tag Enabled Enabled
TextAdjustment - -
TextAlign - -
TextAngle - -
TextEffect - -
TextImageRelation - -
TextIndent - -
TextVertical - -
UseCompatibleTextRendering - -
WordWrap Enabled Enabled
  • In the rich text box cell, the default value of the CellStyle.MultiLine property is MultiRowTriState.True.
  • To enable GDI+ Compatibility Mode, set the RichTextBoxCell.Style.UseCompatibleTextRendering property to True.

Shortcut Keys

The following table lists keys processed when the rich text box cell is in edit mode and lists keys that are processed by the GcMultiRow control.

Modifier Key RichTextBoxCell GcMultiRow
None Keys.PageUp Enabled -
Keys.PageDown Enabled -
Keys.End Enabled -
Keys.Home Enabled -
Keys.Left Enabled -
Keys.Right Enabled -
Keys.Up Enabled -
Keys.Down Enabled -
Keys.Insert Enabled -
Keys.Delete Enabled -
Keys.BackSpace Enabled -
Keys.Control Keys.PageUp Enabled -
Keys.PageDown Enabled -
Keys.End Enabled -
Keys.Home Enabled -
Keys.Left Enabled -
Keys.Right Enabled -
Keys.Up Enabled -
Keys.Down Enabled -
Keys.A Enabled -
Keys.C Enabled -
Keys.V Enabled -
Keys.X Enabled -
Keys.Shift Keys.Left Enabled -
Keys.Right Enabled -
Keys.Up Enabled -
Keys.Down Enabled -
Keys.Home Enabled -
Keys.End Enabled -
  • Keys.Control + Keys.C is processed by the GcMultiRow control when multiple cells are selected.
  • Keys.PageDown and Keys.PageUp are processed by the GcMultiRow control when the value of the rich text cell has not been modified.
  • Keys.Left is processed by the GcMultiRow control when the cursor is before the first character of the rich text box cell.
  • Keys.Right is processed by the GcMultiRow control when the cursor is after the last character of the rich text box cell.
  • Keys.Up is processed by the GcMultiRow control when the cursor of the rich text box cell is in the first row.
  • Keys.Down is processed by the GcMultiRow control when the cursor of the rich text box cell is in the last row.
  • Keys.Up and Keys.Down are processed by the GcMultiRow control when the rich text box cell does not allow multiple rows.

Events

You can use the GcMultiRow.CellContentClick event to implement processing when clicking in the cell content area. Use the GcMultiRow.CellContentDoubleClick event for a double-click. Use the GcMultiRow.CellEditedFormattedValueChanged event to catch any changes to the cell value. The RichTextBoxEditingControl class event is used to process the RichtextBoxCell editing event.

See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options