Skip to main content
Version: 3.5

DataGridViewCell

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.5.0.0)

Represents an individual cell in a DataGridView control.

public class DataGridViewCell : DataGridViewElement, ICloneable, ICommandSource

Constructors

Instance memberDataGridViewCell()

Initializes a new instance of DataGridViewCell.

Properties

Instance memberColumnIndex

Int32: Returns the column index for this cell.

Instance memberCommand

ICommand: Returns or sets the ICommand implementation to invoke. (Default: null)

Instance memberContextMenu

ContextMenu: Returns or sets the shortcut menu associated with the cell. (Default: null)

Instance memberControl

Control: Returns or sets a child control to display inside the cell.

Instance memberDataGridView

DataGridView: Returns the DataGridView control associated with this DataGridViewCell.

Instance memberDefaultNewRowValue

Object: Returns the default value for a cell in the row for new records.

Instance memberDisplayed

Boolean: Returns a value that indicates whether the cell is currently displayed.

Instance memberEditable

Boolean: Returns whether the cell can be edited.

Instance memberEditedFormattedValue

Object: Returns the current, formatted value of the cell, regardless of whether the cell is in edit mode and the value has not been committed.

Throws:

Instance memberErrorText

String: Returns or sets the text describing an error condition associated with the cell.

Instance memberFormattedValue

Object: Returns the value of the cell as formatted for display.

Throws:

Instance memberFormattedValueType

Type: Returns the type of the formatted value associated with the cell.

Instance memberFrozen

Boolean: Returns a value indicating whether the cell is frozen.

Instance memberHasStyle

Boolean: Returns true it the Style property has been set.

Instance memberHasUserData

Boolean: Checks if the UserData dynamic object was created and has any value.

Instance memberHeight

Int32: Returns the height of the cell.

Instance memberInheritedState

DataGridViewElementStates: Returns the current state of the cell as inherited from the state of its row and column.

Throws:

Instance memberInheritedStyle

DataGridViewCellStyle: Returns the style currently applied to the cell.

Throws:

Instance memberIsCurrentCell

Boolean: Returns whether this is the current cell in the DataGridView.

Instance memberIsInEditMode

Boolean: Returns a value indicating whether this cell is currently being edited.

Instance memberOwningColumn

DataGridViewColumn: Returns the column that contains this cell.

Instance memberOwningRow

DataGridViewRow: Returns the row that contains this cell.

Instance memberReadOnly

Boolean: Returns or sets whether the cell's data can be edited.

Instance memberResizable

Boolean: Returns a value indicating whether the cell can be resized.

Instance memberRowIndex

Int32: Returns the index of the cell's parent row.

Instance memberSelected

Boolean: Returns or sets whether the cell has been selected.

Instance memberSize

Size: Returns the size of the cell.

Instance memberStyle

DataGridViewCellStyle: Returns or sets the style for the cell.

Instance memberTag

Object: Returns or sets the object that contains supplemental data about the cell. (Default: null)

Instance memberToolTipText

String: Returns or sets the ToolTip text associated with this cell.

Instance memberUserData

Object: Returns a dynamic object that can be used to store custom data in relation to this cell.

Instance memberUserPaint

Boolean: Enables or disables the user paint feature for this cell. When UserPaint is true, the application can handle the CellPaint event to draw custom content in the cell. (Default: False)

Instance memberValue

Object: Returns or sets the value associated with this cell.

Throws:

Instance memberValueType

Type: Returns or sets the data type of the values in the cell.

Instance memberVisible

Boolean: Returns a value indicating whether the cell is in a row or column that has been hidden.

Instance memberWidth

Int32: Returns the width of the cell.

Methods

Instance memberClone()

Creates a copy of this cell.

Returns: DataGridViewCell. The cloned DataGridViewCell.

Instance memberGetEditedFormattedValue()

Returns the current, formatted value of the cell, regardless the cell being in edit mode.

Returns: Object. The current, formatted value of the DataGridViewCell.

Throws:

Instance memberGetInheritedContextMenu()

Returns the inherited ContextMenu for the current cell.

Returns: ContextMenu. A ContextMenu instance if the DataGridViewCell, or the owner DataGridViewRow, or the owner DataGridViewColumn, or the owner DataGridView has a ContextMenu assigned; otherwise, null.

Instance memberGetInheritedState()

Returns a value indicating the current state of the cell as inherited from the state of its row and column.

Returns: DataGridViewElementStates. A combination of DataGridViewElementStates values representing the current state of the cell.

Instance memberGetInheritedStyle(includeVisualProperties)

Returns the style applied to the cell.

ParameterTypeDescription
includeVisualPropertiesBooleantrue to include inherited visual properties; otherwise, false to include only formatting properties.

Returns: DataGridViewCellStyle. A DataGridViewCellStyle that includes the style settings of the cell inherited from the cell's parent row, column, and DataGridView.

Throws:

Instance memberParseFormattedValue(value, cellStyle, formattedTypeConverter, valueTypeConverter)

Converts a value to the actual cell value.

ParameterTypeDescription
valueObjectThe display value of the cell.
cellStyleDataGridViewCellStyleThe DataGridViewCellStyle in effect for the cell.
formattedTypeConverterTypeConverterA TypeConverter for the display value type, or null to use the default converter.
valueTypeConverterTypeConverterA TypeConverter for the cell value type, or null to use the default converter.

Returns: Object. The cell value.

Throws:

Instance memberResetReadOnly()

Resets the ReadOnly state to inherit its value from the OwningColumn, OwningRowand the DataGridView.

Instance memberShouldUpdate()

Indicates whether the cell data should be updated on the client even if the user didn't change the value when editing. Since 3.2.5

Returns: Boolean. true to force the cell to update the client.

Used to allow the server to update the cell after editing mode is terminated and the user didn't change anything. For example, a password cell can be obfuscated, or a custom cell may need to always format the rendered value when terminating edit mode.

Instance memberUpdate()

Updates the cell on the client.

Inherited By

NameDescription
DataGridViewButtonCellDisplays a button widget in a DataGridViewCell cell.
DataGridViewCheckBoxCellDisplays a CheckBox icon (not the actual control) in a DataGridViewCell cell.
DataGridViewComboBoxCellDisplays an editable ComboBox control in a DataGridViewCell cell when in edit mode.
DataGridViewDateTimePickerCellDisplays an editable DateTimePicker control in a DataGridViewCell cell when in edit mode.
DataGridViewImageCellDisplays an image in a DataGridViewCell cell.
DataGridViewLinkCellDisplays a link widget in a DataGridViewCell cell.
DataGridViewMaskedTextBoxCellDisplays an editable MaskedTextBox control in a DataGridViewCell cell when in edit mode.
DataGridViewNumericUpDownCellDisplays an editable NumericUpDown control in a DataGridViewCell cell when in edit mode.
DataGridViewTextBoxCellDisplays an editable TextBox control in a DataGridViewCell cell when in edit mode.
DataGridViewColumnHeaderCellRepresents a column header in a DataGridView control.
DataGridViewHeaderCellContains functionality common to row header cells and column header cells.
DataGridViewRowHeaderCellRepresents a row header of a DataGridView control.

Implements

NameDescription
ICommandSourceDefines an object that can invoke a Command.