# SiColumnSelectionDialogService documentation

**Kind:** class

**Provided in:** `root`

```
import { SiColumnSelectionDialogService } from '@siemens/element-ng/column-selection-dialog';
```

```
undecorated_class SiColumnSelectionDialogService
```

#### Attributes and Methods

##### showColumnSelectionDialog

[Source for showColumnSelectionDialog](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.service.ts#L34-L69>)

Opens a column selection dialog.

Despite other dialogs, this dialog informs the consumer not ONLY with clicking `submit` or `cancel`, but also with changing the place or visibility of a dialog row thanks to the `instant` type of emitted event.

```
showColumnSelectionDialog(dialogConfig: SiColumnSelectionDialogConfig, diOptions?: ModalDependencyInjectionOptions): Observable<ColumnSelectionDialogResult>
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [dialogConfig](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.service.ts#L35-L35>) | `SiColumnSelectionDialogConfig` |  |  |
| [diOptions](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.service.ts#L36-L36>) (optional) | `ModalDependencyInjectionOptions` |  |  |

**Returns:** [Observable](<https://rxjs.dev/api/index/class/Observable>)`<`[ColumnSelectionDialogResult](<index.html#t:ColumnSelectionDialogResult>)`>`

### Types Documentation

### [ColumnSelectionDialogResult](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L54-L59>)

**Kind:** interface

```
import type { ColumnSelectionDialogResult } from '@siemens/element-ng/column-selection-dialog';
```

```
interface ColumnSelectionDialogResult
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [columns](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L56-L56>) | `Column[]` |  |
| [type](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L55-L55>) | `ColumnSelectionDialogResultType` |  |
| [updateColumns](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L58-L58>) (optional) | `((columns: Column[]) => void)` | when `type === 'restoreDefault'`, this function is set and allows to provide the columns |

### [ModalDependencyInjectionOptions](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L25-L32>)

**Kind:** interface

```
import type { ModalDependencyInjectionOptions } from '@siemens/element-ng/modal';
```

```
interface ModalDependencyInjectionOptions
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [environmentInjector](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L31-L31>) (optional) | `EnvironmentInjector` | Optional environment Injector. |
| [injector](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L29-L29>) (optional) | `Injector` | Optional element Injector. |
| [providers](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L27-L27>) (optional) | `StaticProvider[]` | Additional providers for the modal. |

### [SiColumnSelectionDialogConfig](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L36-L52>)

**Kind:** interface

```
import type { SiColumnSelectionDialogConfig } from '@siemens/element-ng/column-selection-dialog';
```

```
interface SiColumnSelectionDialogConfig
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [a11yItemMovedMessage](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L50-L50>) (optional) | `TranslatableString` |  |
| [a11yItemNotMovedMessage](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L51-L51>) (optional) | `TranslatableString` |  |
| [bodyTitle](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L38-L38>) | `TranslatableString` |  |
| [cancelBtnName](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L40-L40>) (optional) | `TranslatableString` |  |
| [columns](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L46-L46>) | `Column[]` |  |
| [columnVisibilityConfigurable](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L44-L44>) (optional) | `boolean` |  |
| [heading](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L37-L37>) | `TranslatableString` |  |
| [hiddenText](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L42-L42>) (optional) | `TranslatableString` |  |
| [listAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L48-L48>) (optional) | `TranslatableString` |  |
| [renameInputAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L49-L49>) (optional) | `TranslatableString` |  |
| [restoreEnabled](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L45-L45>) (optional) | `boolean` |  |
| [restoreToDefaultBtnName](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L41-L41>) (optional) | `TranslatableString` |  |
| [submitBtnName](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L39-L39>) (optional) | `TranslatableString` |  |
| [translationParams](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L47-L47>) (optional) | `{ [key: string]: any; }` |  |
| [visibleText](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L43-L43>) (optional) | `TranslatableString` |  |

### [ColumnSelectionDialogResultType](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L70-L70>)

**Kind:** type alias

```
import type { ColumnSelectionDialogResultType } from '@siemens/element-ng/column-selection-dialog';
```

Emit type of dialog actions.

`ok` : Emitted when user submits. `cancel` : Emitted when user clicks cancel. `instant` : Emitted when visibility or place of a row changes.

`instant` type is used to reflect the ui changes real time even before closing the dialog.

```
type ColumnSelectionDialogResultType = 'ok' | 'cancel' | 'instant' | 'restoreDefault'
```

### [Column](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L7-L34>)

**Kind:** interface

```
import type { Column } from '@siemens/element-ng/column-selection-dialog';
```

```
interface Column
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [disabled](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L29-L29>) | `boolean` | If true, the column is disabled and cannot be interacted with. This means, the user cannot change any of the column options like the visibility etc. |
| [draggable](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L23-L23>) | `boolean` | If true, the order of the column can be changed by dragging it to another position. |
| [editable](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L33-L33>) (optional) | `boolean` | If true, the [title](<index.html#t:Column.title>) can be renamed. |
| [id](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L11-L11>) | `string` | Unique id |
| [title](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L15-L15>) | `string` | Title of the column. |
| [visible](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L19-L19>) | `boolean` | Decides if the column is visible to the user. |

### [TranslatableString](<https://github.com/siemens/element/blob/main/projects/element-translate-ng/translate-types/global.types.ts#L18-L18>)

**Kind:** type alias

```
import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';
```

Represents a translatable string. This can either be a translation key, e.g. `ACTIONS.EDIT` that will be automatically translated when displayed on the UI or a pre-translated string, e.g. `Edit`. Equivalent to a normal string in usage and functionality.

```
type TranslatableString = string & Translatable
```
