## AddButton(int, int, int, int, string) {#addbutton}

Adds a button to a specified cell at row column index.

```csharp
public Button AddButton(int row, int col, int width, int height, string text)
```

| Parameter | Type | Description |
| --- | --- | --- |
| row | Int32 | Row index of cell. |
| col | Int32 | Column index of cell. |
| width | Int32 | Width of button. |
| height | Int32 | Height of button. |
| text | String | Button text. |

### Return Value

The added button.

### See Also

* class [Button](../../button/)
* class [CellControlCollection](../)
* namespace [Aspose.Cells.GridDesktop](../../../aspose.cells.griddesktop/)
* assembly [Aspose.Cells.GridDesktop](../../../)

---

## AddButton(string, int, int, string) {#addbutton_2}

Adds a button to a specified cell by cell name.

```csharp
public Button AddButton(string cellName, int width, int height, string text)
```

| Parameter | Type | Description |
| --- | --- | --- |
| cellName | String | Name of grid cell. |
| width | Int32 | Width of button. |
| height | Int32 | Height of button. |
| text | String | Button text. |

### Return Value

The added button.

### See Also

* class [Button](../../button/)
* class [CellControlCollection](../)
* namespace [Aspose.Cells.GridDesktop](../../../aspose.cells.griddesktop/)
* assembly [Aspose.Cells.GridDesktop](../../../)

---

## AddButton(int, int, int, int, string, bool) {#addbutton_1}

Adds a button to a specified cell at row column index.

```csharp
public Button AddButton(int row, int col, int width, int height, string text, bool alwaysVisible)
```

| Parameter | Type | Description |
| --- | --- | --- |
| row | Int32 | Row index of cell. |
| col | Int32 | Column index of cell. |
| width | Int32 | Width of button. |
| height | Int32 | Height of button. |
| text | String | Button text. |
| alwaysVisible | Boolean | If the Button should always visible, only work for Cell Control Button. |

### Return Value

The added button.

### See Also

* class [Button](../../button/)
* class [CellControlCollection](../)
* namespace [Aspose.Cells.GridDesktop](../../../aspose.cells.griddesktop/)
* assembly [Aspose.Cells.GridDesktop](../../../)

---

## AddButton(string, int, int, string, bool) {#addbutton_3}

Adds a button to a specified cell by cell name.

```csharp
public Button AddButton(string cellName, int width, int height, string text, bool alwaysVisible)
```

| Parameter | Type | Description |
| --- | --- | --- |
| cellName | String | Name of grid cell. |
| width | Int32 | Width of button. |
| height | Int32 | Height of button. |
| text | String | Button text. |
| alwaysVisible | Boolean | If the Button should always visible, only work for Cell Control Button. |

### Return Value

The added button.

### See Also

* class [Button](../../button/)
* class [CellControlCollection](../)
* namespace [Aspose.Cells.GridDesktop](../../../aspose.cells.griddesktop/)
* assembly [Aspose.Cells.GridDesktop](../../../)


