# Javascript: TableCellCollection.getCanRemove Method

> Gets a value indicating whether table cells can be removed. Table cells can be removed, if either the current text input position is in a table, or if a part of a table is selected.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TableCellCollection.getCanRemove Method
- **433 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecellcollection/getcanremove-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecellcollection/getcanremove-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecellcollection/getcanremove-method/llms-full.txt

---

### Description

Gets a value indicating whether table cells can be removed. Table cells can be removed, if either the current text input position is in a table, or if a part of a table is selected.

### Syntax

```javascript
<void> TableCellCollection.getCanRemove(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives whether the cells can be removed. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `TableCellCollection.getCanRemove` in a practical document-editing workflow. It gets a value indicating whether table cells can be removed. Table cells can be removed, if either the current text input position is in a table, or if a part of a table is selected.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

function inspectCanRemove(tableCells) {
    tableCells.getCanRemove(
        function(result) {
            if (result) {
                console.log("get can remove is available.");
            } else {
                console.warn("get can remove is not available in the current document state.");
            }
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [TableCellCollection Object](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecellcollection/llms-full.txt)
- **Next:** [Javascript: TableCellCollection.getItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecellcollection/getitem-method/llms-full.txt)
