DataGridViewBand Class

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Represents a linear collection of elements in a DataGridView control.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)


type DataGridViewBand = 
    class
        inherit DataGridViewElement
        interface ICloneable
        interface IDisposable
    end

NameDescription
System_CAPS_pubpropertyContextMenuStrip

Gets or sets the shortcut menu for the band.

System_CAPS_pubpropertyDataGridView

Gets the DataGridView control associated with this element.(Inherited from DataGridViewElement.)

System_CAPS_pubpropertyDefaultCellStyle

Gets or sets the default cell style of the band.

System_CAPS_pubpropertyDefaultHeaderCellType

Gets or sets the run-time type of the default header cell.

System_CAPS_pubpropertyDisplayed

Gets a value indicating whether the band is currently displayed onscreen.

System_CAPS_pubpropertyFrozen

Gets or sets a value indicating whether the band will move when a user scrolls through the DataGridView.

System_CAPS_pubpropertyHasDefaultCellStyle

Gets a value indicating whether the DefaultCellStyle property has been set.

System_CAPS_protpropertyHeaderCellCore

Gets or sets the header cell of the DataGridViewBand.

System_CAPS_pubpropertyIndex

Gets the relative position of the band within the DataGridView control.

System_CAPS_pubpropertyInheritedStyle

Gets the cell style in effect for the current band, taking into account style inheritance.

System_CAPS_protpropertyIsRow

Gets a value indicating whether the band represents a row.

System_CAPS_pubpropertyReadOnly

Gets or sets a value indicating whether the user can edit the band's cells.

System_CAPS_pubpropertyResizable

Gets or sets a value indicating whether the band can be resized in the user interface (UI).

System_CAPS_pubpropertySelected

Gets or sets a value indicating whether the band is in a selected user interface (UI) state.

System_CAPS_pubpropertyState

Gets the user interface (UI) state of the element.(Inherited from DataGridViewElement.)

System_CAPS_pubpropertyTag

Gets or sets the object that contains data to associate with the band.

System_CAPS_pubpropertyVisible

Gets or sets a value indicating whether the band is visible to the user.

NameDescription
System_CAPS_pubmethodClone()

Creates an exact copy of this band.

System_CAPS_pubmethodDispose()

Releases all resources used by the DataGridViewBand.

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by the DataGridViewBand and optionally releases the managed resources.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Releases the resources associated with the band.(Overrides Object.Finalize().)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodOnDataGridViewChanged()

Called when the band is associated with a different DataGridView.(Overrides DataGridViewElement.OnDataGridViewChanged().)

System_CAPS_protmethodRaiseCellClick(DataGridViewCellEventArgs)

Raises the DataGridView.CellClick event. (Inherited from DataGridViewElement.)

System_CAPS_protmethodRaiseCellContentClick(DataGridViewCellEventArgs)

Raises the DataGridView.CellContentClick event. (Inherited from DataGridViewElement.)

System_CAPS_protmethodRaiseCellContentDoubleClick(DataGridViewCellEventArgs)

Raises the DataGridView.CellContentDoubleClick event. (Inherited from DataGridViewElement.)

System_CAPS_protmethodRaiseCellValueChanged(DataGridViewCellEventArgs)

Raises the DataGridView.CellValueChanged event. (Inherited from DataGridViewElement.)

System_CAPS_protmethodRaiseDataError(DataGridViewDataErrorEventArgs)

Raises the DataGridView.DataError event. (Inherited from DataGridViewElement.)

System_CAPS_protmethodRaiseMouseWheel(MouseEventArgs)

Raises the Control.MouseWheel event. (Inherited from DataGridViewElement.)

System_CAPS_pubmethodToString()

Returns a string that represents the current band.(Overrides Object.ToString().)

The DataGridViewBand class represents DataGridViewCell elements joined together in a band that can be manipulated as a group. Each element is typically an instance of DataGridViewCell or one of its derived classes. Although a DataGridViewHeaderCell is associated with each band, header cells are not considered elements of the band.

DataGridViewBand is the base class of the DataGridViewRow and DataGridViewColumn classes. There are no public constructors for the DataGridViewBand type, so the only way to access a band is through columns and rows in a DataGridView.

The following code example uses a DataGridViewBand to manipulate properties of groups of cells in a DataGridView.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: