DataGridViewTextBoxCell
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.1.0.0)
Displays an editable TextBox control in a DataGridViewCell cell when in edit mode.
- C#
- VB.NET
public class DataGridViewTextBoxCell : DataGridViewCell
Public Class DataGridViewTextBoxCell
Inherits DataGridViewCell
Constructors
DataGridViewTextBoxCell()
Initializes a new instance of DataGridViewTextBoxCell.
Properties
AcceptsReturn
Boolean: Returns or sets whether pressing ENTER in a MultilineDataGridViewTextBoxCell creates a new line of text or terminates edit mode. (Default: False)
Value: true if the ENTER key creates a new line of text when Multiline is true; false if the ENTER key terminates edit mode in the current cell. The default is false.
AcceptsTab
Boolean: Returns or sets whether pressing the TAB key in a multiline text box control types a TAB character in the control instead of moving the focus to the next control in the tab order. (Default: False)
Value: true if users can enter tabs in a multiline text box using the TAB key; false if pressing the TAB key moves the focus. The default is false.
The Multiline property must be true to get a TAB character in the control.
If the AcceptsTab property is set to true, the user can press SHIFT+TAB to move the focus to the next control in the tab order.
AutoComplete
AutoComplete: Returns or sets whether the browser can auto complete the field with values previously entered by the user.
AutoCompleteList
String[]: Identifies a list of pre-defined options to suggest to the user.
CharacterCasing
CharacterCasing: Returns or sets whether the cell editor modifies the case of characters as they are typed. (Default: Normal)
Value: One of the CharacterCasing enumeration values. The default is CharacterCasing.Normal.
DefaultPasswordText 3.2.5+
String: Defines the default text to display in a DataGridViewTextBoxCell cell when the Type property is set to Password.
EditType
Type: Returns the type of the cell's editing control.
Value: A Type representing the DataGridViewTextBoxEditingControl type.
InputType
InputType: Specifies the type, min, max and step properties to associate to the <input> element.
MaxInputLength
Int32: Returns or sets the maximum number of characters that can be entered into the cell editor. (Default: 0)
Value: The maximum number of characters that can be entered into the text box; the default value is 0 (unlimited).
Throws:
- ArgumentOutOfRangeException The value is less than 0.
Multiline
Boolean: Returns or sets whether this is a multiline text box control. (Default: False)
Value: true if the control is a multiline text box control; otherwise, false. The default is false.
Throws:
- ArgumentException The property cannot be modified after the component has been created.
Tools
ComponentToolCollection: Returns the instance of ComponentToolCollection associated with this cell.
ValueType
Type: Returns or sets the data type of the values in the cell.
Value: A Type representing the data type of the value in the cell.
Watermark
String: Returns or sets the text to show when the textbox is empty.
Methods
GetCellDataValue(cellStyle, includeVisualProperties)
Returns the data value of the cell. This is the value that is returned to the client in the data response stream.
| Parameter | Type | Description |
|---|---|---|
| cellStyle | DataGridViewCellStyle | The cell style in effect for the current cell, used to format the cell's value for the client rendering. |
| includeVisualProperties | Boolean | true to include inherited visual properties; otherwise, false to include only formatting properties. |
Returns: Object.
InitializeEditingControl(editor, style)
Initializes the control used to edit the cell.
| Parameter | Type | Description |
|---|---|---|
| editor | Control | The Control that is used to edit the cell. |
| style | DataGridViewCellStyle | The DataGridViewCellStyle that is in effect for the cell entering edit mode. |
Throws:
- ArgumentNullException editor is null.
ResetInputType()
Resets the InputType property.
ShouldUpdate()
Indicates whether the cell data should be updated on the client even if the user didn't change the value when editing.
Returns: Boolean.
Implements
| Name | Description |
|---|---|
| IUserData | Provides access to the UserData and Tag properties associated to the component implementing this interface. |
| ICommandSource | Defines an object that can invoke a Command. |