# DataGridViewRowHeaderCell

Namespace: **Wisej.Web**

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

* [DataGridViewElement](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewelement.md)
  * [DataGridViewCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell.md)
    * [DataGridViewHeaderCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewheadercell.md)
      * [DataGridViewRowHeaderCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewrowheadercell.md)

Represents a row header of a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) control.

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

```csharp
public class DataGridViewRowHeaderCell : DataGridViewHeaderCell
```

{% endtab %}

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

```visual-basic
Public Class DataGridViewRowHeaderCell
    Inherits DataGridViewHeaderCell
```

{% endtab %}
{% endtabs %}

## Constructors

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

Initializes a new instance of [DataGridViewRowHeaderCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewrowheadercell.md).

## Properties

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns the client index of the row header column - always 0.

## Methods

### ![](/files/lzopMboA31bVq8UIcbT3) GetClipboardContent(rowIndex, firstCell, lastCell, inFirstRow, inLastRow, format)

Returns the formatted value of the cell to copy to the [Clipboard](/api/wisej.web/general/wisej.web.clipboard.md).

| Parameter      | Type                                                            | Description                                                                                                          |
| -------------- | --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| **rowIndex**   | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)     | The zero-based index of the row containing the cell.                                                                 |
| **firstCell**  | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true to indicate that the cell is in the first column of the region defined by the selected cells; otherwise, false. |
| **lastCell**   | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true to indicate that the cell is the last column of the region defined by the selected cells; otherwise, false.     |
| **inFirstRow** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true to indicate that the cell is in the first row of the region defined by the selected cells; otherwise, false.    |
| **inLastRow**  | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true to indicate that the cell is in the last row of the region defined by the selected cells; otherwise, false.     |
| **format**     | [String](https://docs.microsoft.com/dotnet/api/system.string)   | The current format string of the cell.                                                                               |

**Returns:** [Object](https://docs.microsoft.com/dotnet/api/system.object). An [Object](https://docs.microsoft.com/dotnet/api/system.object) that represents the value of the cell to copy to the [Clipboard](/api/wisej.web/general/wisej.web.clipboard.md).

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)*rowIndex* is less than 0 or greater than or equal to the number of rows in the control.
* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)\
  The value of the cell's [DataGridView](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewelement.md#datagridview) property is null.-or-[ColumnIndex](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell.md#columnindex) is less than 0, indicating that the cell is a row header cell.
* [Exception](https://docs.microsoft.com/dotnet/api/system.exception)\
  Formatting failed and either there is no handler for the [DataError](/api/wisej.web/lists-and-grids/datagridview.md#dataerror) event of the [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) control or the handler set the [ThrowException](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdataerroreventargs.md#throwexception) property to true. The exception object can typically be cast to type [FormatException](https://docs.microsoft.com/dotnet/api/system.formatexception).

### ![](/files/hsR4ok3152WyAf8J2C1u) GetInheritedStyle(includeVisualProperties)

Returns the style applied to the row header cell.

| Parameter                   | Type                                                            | Description                                                                                          |
| --------------------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| **includeVisualProperties** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true to include inherited visual properties; otherwise, false to include only formatting properties. |

**Returns:** [DataGridViewCellStyle](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle.md). A [DataGridViewCellStyle](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle.md) that includes the style of the row header cell and the style inherited from the [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md).

**Throws:**

* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)\
  The cell has no associated [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md).

## 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. |
| [ICommandSource](/api/wisej.web/interfaces/wisej.web.icommandsource.md) | Defines an object that can invoke a [Command](/api/wisej.web/interfaces/wisej.web.icommandsource.md#command).   |


---

# 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.datagridviewrowheadercell.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.
