DataGridViewCellStyle
Wisej.Web.DataGridViewCellStyle
Namespace: Wisej.Web
Assembly: Wisej.Framework (3.1.0.0)
Represents the formatting and style information applied to individual cells within a DataGridView control.
C#
VB.NET
public class DataGridViewCellStyle : ICloneable, IHasPropertyStore, IDisposable
Public Class DataGridViewCellStyle
Inherits ICloneable
Implements IHasPropertyStore, IDisposable
DataGridViewContentAlignment: Returns or sets a value indicating the position of the cell content within a DataGridViewCell cell. (Default:
NotSet
)ContentAlignment: Returns or sets the background image alignment as defined in the ContentAlignment enumeration. (Default:
MiddleLeft
)ImageLayout: Returns or sets the background image layout as defined in the ImageLayout enumeration. (Default:
None
)String: Returns or sets the theme name or URL for the background image displayed in a DataGridViewCell cell. (Default:
null
)Int32: Returns or sets the number of columns that this cell can use to render its content. (Default:
1
)Throws:
You can use any CSS style string.
// add a double underline to the cell.
this.dataGridView1[3, 4].Style.CssStyle = "border-bottom:2px solid black";
Object: Returns or sets the value saved to the data source when the user enters a null value into a cell.
IFormatProvider: Returns or sets the object used to provide culture-specific formatting of DataGridView cell values.
Object: Returns or sets the DataGridView cell display value corresponding to a cell value of Value or null.
Int32: Returns or sets the number of rows that this cell can use to render its content. (Default:
1
)Throws:
Object: Returns or sets an object that contains additional data related to the DataGridViewCellStyle.
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.
Returns: DataGridViewCellStyle. A DataGridViewCellStyle that represents an exact copy of this cell style.