# Javascript: TableCell.setPosition Method

> Sets, in twips, the horizontal position of the cell.

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

---

### Description

Sets, in twips, the horizontal position of the cell.

### Syntax

```javascript
<void> TableCell.setPosition(<number> position, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| position | The horizontal position of the cell. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `TableCell.setPosition` in a practical document-editing workflow. Sets, in twips, the horizontal position of the cell.

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

function configurePosition(tableCell) {
    tableCell.setPosition(
        -1,
        function() {
            console.log("set position completed.");
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: TableCell.setName Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/setname-method/llms-full.txt)
- **Next:** [Javascript: TableCell.setText Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablecell/settext-method/llms-full.txt)
