# DataGridViewBand

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

* [DataGridViewElement](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewelement.md)
  * [DataGridViewBand](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewband.md)

Represents a linear collection of elements in a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) control.

{% tabs %}
{% tab title="C#" %}

```csharp
public class DataGridViewBand : DataGridViewElement, ICloneable, IUserData
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class DataGridViewBand
    Inherits DataGridViewElement
    Implements ICloneable, IUserData
```

{% endtab %}
{% endtabs %}

## Properties

### ![](/files/hsR4ok3152WyAf8J2C1u) ContextMenu

[ContextMenu](/api/wisej.web/menus/wisej.web.contextmenu.md): Returns or sets the shortcut menu for the row or the column object. (Default: `null`)

### ![](/files/hsR4ok3152WyAf8J2C1u) DefaultCellStyle

[DataGridViewCellStyle](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle.md): Returns or sets the default cell style of the band.

### ![](/files/hsR4ok3152WyAf8J2C1u) DefaultHeaderCellType

[Type](https://docs.microsoft.com/dotnet/api/system.type): Returns or sets the run-time type of the default header cell.

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception)\
  The specified value when setting this property is not a [Type](https://docs.microsoft.com/dotnet/api/system.type) representing [DataGridViewHeaderCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewheadercell.md) or a derived type.

### ![](/files/hsR4ok3152WyAf8J2C1u) DefaultMinimumSize

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns the default minimum size for the band (row or column.)

### ![](/files/hsR4ok3152WyAf8J2C1u) DefaultSize

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns the default size for the band (row or column.)

### ![](/files/hsR4ok3152WyAf8J2C1u) Displayed

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns a value indicating whether the band is currently displayed on screen.

### ![](/files/hsR4ok3152WyAf8J2C1u) Frozen

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the band will move when a user scrolls through the [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md). (Default: `False`)

### ![](/files/hsR4ok3152WyAf8J2C1u) HasDefaultCellStyle

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns a value indicating whether the [DefaultCellStyle](#defaultcellstyle) property has been set.

### ![](/files/hsR4ok3152WyAf8J2C1u) HasUserData

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Checks if the [UserData](#userdata) dynamic object was created and has any value.

### ![](/files/lzopMboA31bVq8UIcbT3) HeaderCellCore

[DataGridViewHeaderCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewheadercell.md): Returns or sets the header cell of the [DataGridViewBand](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewband.md).

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception)\
  The specified value when setting this property is not a [DataGridViewRowHeaderCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewrowheadercell.md) and this [DataGridViewBand](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewband.md) instance is of type [DataGridViewRow](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewrow.md); or the specified value when setting this property is not a [DataGridViewColumnHeaderCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcolumnheadercell.md) and this [DataGridViewBand](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewband.md) instance is of type [DataGridViewColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcolumn.md).

### ![](/files/hsR4ok3152WyAf8J2C1u) Index

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns the relative position of the band within the [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) control.

### ![](/files/hsR4ok3152WyAf8J2C1u) InheritedStyle

[DataGridViewCellStyle](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle.md): Returns the cell style in effect for the current band, taking into account style inheritance.

### ![](/files/hsR4ok3152WyAf8J2C1u) IsRow

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns true when the implementation class is DataGridViewRow.

### ![](/files/hsR4ok3152WyAf8J2C1u) ReadOnly

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the user can edit the band's cells. (Default: `False`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Resizable

[DataGridViewTriState](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtristate.md): Returns or sets whether the band can be resized in the user interface (UI).

### ![](/files/hsR4ok3152WyAf8J2C1u) Selected

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the band is in a selected user interface (UI) state.

### ![](/files/hsR4ok3152WyAf8J2C1u) Tag

[Object](https://docs.microsoft.com/dotnet/api/system.object): Returns or sets the object that contains data to associate with the band.

### ![](/files/hsR4ok3152WyAf8J2C1u) UserData

[Object](https://docs.microsoft.com/dotnet/api/system.object): Returns a dynamic object that can be used to store custom data in relation to this band.

### ![](/files/hsR4ok3152WyAf8J2C1u) Visible

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the band is visible to the user. (Default: `True`)

**Throws:**

* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)\
  The specified value when setting this property is false and the band is the row for new records.

## Methods

### ![](/files/hsR4ok3152WyAf8J2C1u) Clone()

Creates an exact copy of this band.

**Returns:** [Object](https://docs.microsoft.com/dotnet/api/system.object). An [Object](https://docs.microsoft.com/dotnet/api/system.object) that represents the cloned [DataGridViewBand](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewband.md).

### ![](/files/lzopMboA31bVq8UIcbT3) Dispose(disposing)

Releases the resources used by the [DataGridViewBand](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewband.md).

| Parameter     | Type                                                            | Description                                                                 |
| ------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------- |
| **disposing** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true when this method is called by the application rather than a finalizer. |

## Inherited By

| Name                                                                                                                          | Description                                                                                                                                                                                                                                       |
| ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DataGridViewButtonColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewbuttoncolumn.md)                 | Represents a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) column that contains a collection of [DataGridViewButtonCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewbuttoncell.md) cells.                 |
| [DataGridViewCheckBoxColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcheckboxcolumn.md)             | Represents a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) column that contains a collection of [DataGridViewCheckBoxCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcheckboxcell.md) cells.             |
| [DataGridViewColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcolumn.md)                             | Represents a column in a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) control.                                                                                                                                                  |
| [DataGridViewComboBoxColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcolumn.md)             | Represents a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) column that contains a collection of [DataGridViewComboBoxCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcell.md) cells.             |
| [DataGridViewDateTimePickerColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickercolumn.md) | Represents a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) column that contains a collection of [DataGridViewDateTimePickerCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickercell.md) cells. |
| [DataGridViewImageColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewimagecolumn.md)                   | Represents a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) column that contains a collection of [DataGridViewImageCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewimagecell.md) cells.                   |
| [DataGridViewLinkColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewlinkcolumn.md)                     | Represents a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) column that contains a collection of [DataGridViewLinkCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewlinkcell.md) cells.                     |
| [DataGridViewMaskedTextBoxColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewmaskedtextboxcolumn.md)   | Represents a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) column that contains a collection of [DataGridViewTextBoxCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxcell.md) cells.               |
| [DataGridViewNumericUpDownColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewnumericupdowncolumn.md)   | Represents a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) column that contains a collection of [DataGridViewNumericUpDownCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewnumericupdowncell.md) cells.   |
| [DataGridViewTextBoxColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxcolumn.md)               | Represents a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) column that contains a collection of [DataGridViewTextBoxCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxcell.md) cells.               |
| [DataGridViewRow](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewrow.md)                                   | Represents a row in a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) control.                                                                                                                                                     |
| [DataGridViewSummaryRow](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewsummaryrow.md)                     | Represents a summary row in a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) control.                                                                                                                                             |

## Implements

| Name                                                          | Description                                                                                                     |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| [IUserData](/api/wisej.web/interfaces/wisej.web.iuserdata.md) | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewband.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
