How to restrict a column not to be reordered

57 Views Asked by At

In ngx-datatable i make first column not draggable then i can't drag it. issue is that when i drag some other column which is draggable then it's order change. i want stop it by both way.

  <!-- 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>```
0

There are 0 best solutions below