DataGridViewCellStyle

Wisej.Web.DataGridViewCellStyle

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.0.0.0)

Represents the formatting and style information applied to individual cells within a DataGridView control.

public class DataGridViewCellStyle : ICloneable, IHasPropertyStore, IDisposable

Constructors

DataGridViewCellStyle()

Initializes a new instance of the DataGridViewCellStyle class using default property values.

Properties

Alignment

DataGridViewContentAlignment: Returns or sets a value indicating the position of the cell content within a DataGridViewCell cell. (Default: NotSet)

BackColor

Colorarrow-up-right: Returns or sets the background color of a DataGridViewCell cell.

BackgroundImage

Imagearrow-up-right: Returns or sets the background image displayed in a DataGridViewCell cell. (Default: null)

BackgroundImageAlign

ContentAlignmentarrow-up-right: Returns or sets the background image alignment as defined in the ContentAlignmentarrow-up-right enumeration. (Default: MiddleLeft)

BackgroundImageLayout

ImageLayout: Returns or sets the background image layout as defined in the ImageLayout enumeration. (Default: None)

BackgroundImageSource

Stringarrow-up-right: Returns or sets the theme name or URL for the background image displayed in a DataGridViewCell cell. (Default: null)

ColSpan

Int32arrow-up-right: Returns or sets the number of columns that this cell can use to render its content. (Default: 1)

Throws:

CssClass

Stringarrow-up-right: Returns or sets additional CSS class names to add to the DataGridViewCell.

CssStyle

Stringarrow-up-right: Returns or sets the custom CSS styles to apply to the DataGridViewCell.

You can use any CSS style string.

DataSourceNullValue

Objectarrow-up-right: Returns or sets the value saved to the data source when the user enters a null value into a cell.

Font

Fontarrow-up-right: Returns or sets the font applied to the textual content of a DataGridViewCell cell.

ForeColor

Colorarrow-up-right: Returns or sets the foreground color of a DataGridViewCell cell.

Format

Stringarrow-up-right: Returns or sets the format string applied to the textual content of a DataGridView cell.

FormatProvider

IFormatProviderarrow-up-right: Returns or sets the object used to provide culture-specific formatting of DataGridView cell values.

IsDataSourceNullValueDefault

Booleanarrow-up-right: Returns a value indicating whether the DataSourceNullValue property has been set.

IsFormatProviderDefault

Booleanarrow-up-right: Returns a value that indicates whether the FormatProvider property has been set.

IsNullValueDefault

Booleanarrow-up-right: Returns a value indicating whether the NullValue property has been set.

NullValue

Objectarrow-up-right: Returns or sets the DataGridView cell display value corresponding to a cell value of Valuearrow-up-right or null.

Padding

Padding: Returns or sets the space between the edge of a DataGridViewCell and its content.

RowSpan

Int32arrow-up-right: Returns or sets the number of rows that this cell can use to render its content. (Default: 1)

Throws:

Scope

DataGridViewCellStyleScopes: Returns the scope (the type of object) that owns the cell style.

Tag

Objectarrow-up-right: Returns or sets an object that contains additional data related to the DataGridViewCellStyle.

WrapMode

DataGridViewTriState: Returns or sets whether textual content in a DataGridViewCell cell is wrapped to subsequent lines or truncated when it is too long to fit on a single line.

Methods

Clone()

Creates an exact copy of this DataGridViewCellStyle.

Returns: DataGridViewCellStyle. A DataGridViewCellStyle that represents an exact copy of this cell style.

Dispose()

Releases all resources used by the DataGridViewCellStyle.

Dispose(disposing)

Releases the resources used by the DataGridViewCellStyle.

Parameter
Type
Description

disposing

true when this method is called by the application rather than a finalizer.

Last updated

Was this helpful?