Вам нужно будет использовать привязку свойства ввода draggable
.
Я полагаю, что для вашего component.html ваш компонент ngx-datatable выглядит примерно так.Для первого ngx-datatable-column
вам нужно установить свойство draggable
первого столбца как false
.Что касается других столбцов, вы можете установить draggable
как true, хотя draggable по умолчанию имеет значение true, следовательно, нет необходимости указывать его.
<ngx-datatable #table class="bootstrap" [columns]="dataColumns">
<!-- First column is not draggable -->
<ngx-datatable-column [width]="30" [draggable]="false">
...
</ngx-datatable-column>
<!-- The other columns are draggable -->
<ngx-datatable-column *ngFor="let column of dataColumns| slice:1; let i = index;" name="{{column.name}}" prop="{{column.prop}}" [draggable]="true">
...
</ngx-datatable-column>
</ngx-datatable>
И в ваших component.ts вы будетенужно определить свой dataColumns
.
dataColumns = [
{
prop: 'id',
name: 'ID'
},
.
.
// other column definitions
]