System.Windows.Forms.DataGrid: Property Members

The properties of System.Windows.Forms.DataGrid are listed below. For a list of all members, see the DataGrid Members list.

See Also: Inherited members from System.Windows.Forms.Control

Public Properties

AllowNavigationbool.

Gets or sets a value indicating whether navigation is allowed.

AllowSortingbool.

Gets or sets a value indicating whether the grid can be resorted by clicking on a column header.

AlternatingBackColorSystem.Drawing.Color.

Gets or sets the background color of odd-numbered rows of the grid.

override
BackColorSystem.Drawing.Color.

Gets or sets the background color of even-numbered rows of the grid.

BackgroundColorSystem.Drawing.Color.

Gets or sets the color of the non-row area of the grid.

override
BackgroundImageSystem.Drawing.Image.

This member is not meaningful for this control.

override
BackgroundImageLayoutImageLayout.

This member is not meaningful for this control.

BorderStyleBorderStyle.

Gets or sets the grid's border style.

CaptionBackColorSystem.Drawing.Color.

Gets or sets the background color of the caption area.

CaptionFontSystem.Drawing.Font.

Gets or sets the font of the grid's caption.

CaptionForeColorSystem.Drawing.Color.

Gets or sets the foreground color of the caption area.

CaptionTextstring.

Gets or sets the text of the grid's window caption.

CaptionVisiblebool.

Gets or sets a value that indicates whether the grid's caption is visible.

ColumnHeadersVisiblebool.

Gets or sets a value indicating whether the column headers of a table are visible.

CurrentCellDataGridCell.

Gets or sets which cell has the focus. Not available at design time.

CurrentRowIndexint.

Gets or sets index of the row that currently has focus.

override
CursorCursor.

This member is not meaningful for this control.

DataMemberstring.

Gets or sets the specific list in a DataGrid.DataSource for which the System.Windows.Forms.DataGrid control displays a grid.

DataSourceobject.

Gets or sets the data source that the grid is displaying data for.

[read-only]
FirstVisibleColumnint.

Gets the index of the first visible column in a grid.

FlatModebool.

Gets or sets a value indicating whether the grid displays in flat mode.

override
ForeColorSystem.Drawing.Color.

Gets or sets the foreground color (typically the color of the text) property of the System.Windows.Forms.DataGrid control.

GridLineColorSystem.Drawing.Color.

Gets or sets the color of the grid lines.

GridLineStyleDataGridLineStyle.

Gets or sets the line style of the grid.

HeaderBackColorSystem.Drawing.Color.

Gets or sets the background color of all row and column headers.

HeaderFontSystem.Drawing.Font.

Gets or sets the font used for column headers.

HeaderForeColorSystem.Drawing.Color.

Gets or sets the foreground color of headers.

default property
Item(DataGridCell)object. Documentation for this section has not yet been entered.
default property
Item(int, int)object. Documentation for this section has not yet been entered.
LinkColorSystem.Drawing.Color.

Gets or sets the color of the text that you can click to navigate to a child table.

LinkHoverColorSystem.Drawing.Color.

This member is not meaningful for this control.

ParentRowsBackColorSystem.Drawing.Color.

Gets or sets the background color of parent rows.

ParentRowsForeColorSystem.Drawing.Color.

Gets or sets the foreground color of parent rows.

ParentRowsLabelStyleDataGridParentRowsLabelStyle.

Gets or sets the way parent row labels are displayed.

ParentRowsVisiblebool.

Gets or sets a value indicating whether the parent rows of a table are visible.

PreferredColumnWidthint.

Gets or sets the default width of the grid columns in pixels.

PreferredRowHeightint.

Gets or sets the preferred row height for the System.Windows.Forms.DataGrid control.

ReadOnlybool.

Gets or sets a value indicating whether the grid is in read-only mode.

RowHeadersVisiblebool.

Gets or sets a value that specifies whether row headers are visible.

RowHeaderWidthint.

Gets or sets the width of row headers.

SelectionBackColorSystem.Drawing.Color.

Gets or sets the background color of selected rows.

SelectionForeColorSystem.Drawing.Color.

Gets or set the foreground color of selected rows.

override
SiteSystem.ComponentModel.ISite. Documentation for this section has not yet been entered.
[read-only]
TableStylesGridTableStylesCollection.

Gets the collection of System.Windows.Forms.DataGridTableStyle objects for the grid.

override
Textstring.

This member is not meaningful for this control.

[read-only]
VisibleColumnCountint.

Gets the number of visible columns.

[read-only]
VisibleRowCountint.

Gets the number of rows visible.

Protected Properties

[read-only]
override
DefaultSizeSystem.Drawing.Size.

Gets the default size of the control.

[read-only]
HorizScrollBarScrollBar.

Gets the horizontal scroll bar for the grid.

ListManagerCurrencyManager.

Gets the System.Windows.Forms.CurrencyManager for this System.Windows.Forms.DataGrid control.

[read-only]
VertScrollBarScrollBar.

Gets the vertical scroll bar of the control.