CellStyle Builder Dialog Box (Windows Forms DataGridView Control)
Enables you to set DataGridViewCellStyle properties in the designer. This dialog box appears when you click any property that has a name ending with "CellStyle" in the Properties window. For most of the properties in this dialog box, the display in the Preview pane will update when you modify the property value.
Note
You can also set cell styles for multiple selected DataGridView controls by using the designer, but only if they have identical values for the cell style property you want to modify. If any cell styles differ for that property, the Properties windows of the CellStyle Builder dialog box will be blank.
Tag
Associates an arbitrary string with the DataGridViewCellStyle. To associate an arbitrary object with the DataGridViewCellStyle, set this property programmatically.Alignment
Sets the position of the cell content within the affected cells.BackColor
Indicates the background color of the affected cells.Font
Sets the font used to display textual content in the affected cells.ForeColor
Sets the foreground color of the affected cells.Format
Sets a format string or accesses the Format String dialog box to set the format applied to textual content in the affected cells.NullValue
Indicates a string to display in affected cells that have cell values of null (Nothing in Visual Basic) or DBNull.Value. To specify a nonstring value, set this property programmatically.Padding
Sets the space between the edges of the affected cells and their content.SelectionBackColor
Sets the background color used by the affected cells when they are selected.SelectionForeColor
Sets the foreground color used by the affected cells when they are selected.WrapMode
Indicates whether textual content in the affected cells is wrapped to subsequent lines or is truncated when it is too long to fit on a single line. Set this value to NotSet to force the DataGridViewCellStyle to inherit this value from another DataGridViewCellStyle. For more information about style inheritance, see Cell Styles in the Windows Forms DataGridView Control.
See Also
Tasks
Concepts
Cell Styles in the Windows Forms DataGridView Control