> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# newWidthForAllColumnsForMeasure()

- Package: [@gooddata/sdk-ui-pivot](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-pivot/index.md)
- Kind: function
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-pivot/src/columnWidths.ts

Creates width item that will set width for all columns containing values of the provided measure.

**Signature:**

```typescript
export declare function newWidthForAllColumnsForMeasure(measureOrId: IMeasure | string, width: number, allowGrowToFit?: boolean): IWeakMeasureColumnWidthItem;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| measureOrId | [IMeasure](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.imeasure/index.md) \| string | Measure specified either by value or by localId reference |
| width | number | Width in pixels |
| allowGrowToFit | boolean | _(Optional)_ indicates whether the column is allowed to grow if the table's growToFit is enabled |

**Returns:**

[IWeakMeasureColumnWidthItem](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-pivot/sdk-ui-pivot.iweakmeasurecolumnwidthitem/index.md)
