System.Windows.Forms.DataGridColumnStyle Members

The members of System.Windows.Forms.DataGridColumnStyle are listed below.

See Also: Inherited members from System.ComponentModel.Component

Public Constructors

Public Properties

AlignmentHorizontalAlignment.

Gets or sets the alignment of text in a column.

[read-only]
DataGridTableStyleDataGridTableStyle.

Gets the System.Windows.Forms.DataGridTableStyle for the column.

[read-only]
HeaderAccessibleObjectAccessibleObject.

Gets the System.Windows.Forms.AccessibleObject for the column.

HeaderTextstring.

Gets or sets the text of the column header.

MappingNamestring.

Gets or sets the name of the data member to map the column style to.

NullTextstring.

Gets or sets the text that is displayed when the column contains null.

PropertyDescriptorSystem.ComponentModel.PropertyDescriptor.

Gets or sets the System.ComponentModel.PropertyDescriptor that determines the attributes of data displayed by the System.Windows.Forms.DataGridColumnStyle.

ReadOnlybool.

Gets or sets a value indicating whether the data in the column can be edited.

Widthint.

Gets or sets the width of the column.

Protected Properties

[read-only]
FontHeightint.

Gets the height of the column's font.

Public Methods

ResetHeaderText()

Resets the DataGridColumnStyle.HeaderText to its default value, null.

Protected Methods

abstract
Abort(int)

When overridden in a derived class, initiates a request to interrupt an edit procedure.

BeginUpdate()

Suspends the painting of the column until the DataGridColumnStyle.EndUpdate method is called.

CheckValidDataSource(CurrencyManager)

Throws an exception if the System.Windows.Forms.DataGrid does not have a valid data source, or if this column is not mapped to a valid property in the data source.

ColumnStartedEditing(Control)

Informs the System.Windows.Forms.DataGrid that the user has begun editing the column.

abstract
Commit(CurrencyManager, int) : bool

When overridden in a derived class, initiates a request to complete an editing procedure.

ConcedeFocus()

Notifies a column that it must relinquish the focus to the control it is hosting.

CreateHeaderAccessibleObject() : AccessibleObject

Gets the System.Windows.Forms.AccessibleObject for the column.

Edit(CurrencyManager, int, System.Drawing.Rectangle, bool)

Prepares a cell for editing.

Edit(CurrencyManager, int, System.Drawing.Rectangle, bool, string)

Prepares the cell for editing using the specified System.Windows.Forms.CurrencyManager, row number, and System.Drawing.Rectangle parameters.

abstract
Edit(CurrencyManager, int, System.Drawing.Rectangle, bool, string, bool)

When overridden in a deriving class, prepares a cell for editing.

EndUpdate()

Resumes the painting of columns suspended by calling the DataGridColumnStyle.BeginUpdate method.

EnterNullValue()

Enters a DBNull.Value into the column.

GetColumnValueAtRow(CurrencyManager, int) : object

Gets the value in the specified row from the specified System.Windows.Forms.CurrencyManager.

abstract
GetMinimumHeight() : int

When overridden in a derived class, gets the minimum height of a row.

abstract
GetPreferredHeight(System.Drawing.Graphics, object) : int

When overridden in a derived class, gets the height used for automatically resizing columns.

abstract
GetPreferredSize(System.Drawing.Graphics, object) : System.Drawing.Size

When overridden in a derived class, gets the width and height of the specified value. The width and height are used when the user navigates to System.Windows.Forms.DataGridTableStyle using the System.Windows.Forms.DataGridColumnStyle.

Invalidate()

Redraws the column and causes a paint message to be sent to the control.

abstract
Paint(System.Drawing.Graphics, System.Drawing.Rectangle, CurrencyManager, int)

Paints the System.Windows.Forms.DataGridColumnStyle with the specified System.Drawing.Graphics, System.Drawing.Rectangle, System.Windows.Forms.CurrencyManager, and row number.

abstract
Paint(System.Drawing.Graphics, System.Drawing.Rectangle, CurrencyManager, int, bool)

When overridden in a derived class, paints a System.Windows.Forms.DataGridColumnStyle with the specified System.Drawing.Graphics, System.Drawing.Rectangle, System.Windows.Forms.CurrencyManager, row number, and alignment.

Paint(System.Drawing.Graphics, System.Drawing.Rectangle, CurrencyManager, int, System.Drawing.Brush, System.Drawing.Brush, bool)

Paints a System.Windows.Forms.DataGridColumnStyle with the specified System.Drawing.Graphics, System.Drawing.Rectangle, System.Windows.Forms.CurrencyManager, row number, background color, foreground color, and alignment.

ReleaseHostedControl()

Allows the column to free resources when the control it hosts is not needed.

SetColumnValueAtRow(CurrencyManager, int, object)

Sets the value in a specified row with the value from a specified System.Windows.Forms.CurrencyManager.

SetDataGrid(DataGrid)

Sets the System.Windows.Forms.DataGrid control that this column belongs to.

SetDataGridInColumn(DataGrid)

Sets the System.Windows.Forms.DataGrid for the column.

UpdateUI(CurrencyManager, int, string)

Updates the value of a specified row with the given text.

Public Events

AlignmentChanged

Occurs when the DataGridColumnStyle.Alignment property value changes.

FontChanged

Occurs when the column's font changes.

HeaderTextChanged

Occurs when the DataGridColumnStyle.HeaderText property value changes.

MappingNameChanged

Occurs when the DataGridColumnStyle.MappingName value changes.

NullTextChanged

Occurs when the DataGridColumnStyle.NullText value changes.

PropertyDescriptorChanged

Occurs when the DataGridColumnStyle.PropertyDescriptor property value changes.

ReadOnlyChanged

Occurs when the DataGridColumnStyle.ReadOnly property value changes.

WidthChanged

Occurs when the DataGridColumnStyle.Width property value changes.

Explicitly Implemented Interface Members