Ranger
Ranger

Reputation: 23

Datatable 1st column is always sortable

The first column of the angular datatable is showing the sortable icon, even when I have added the DTColumnDefBuilder.newColumnDef(0).notSortable() in dtColumnDefs.

Upvotes: 2

Views: 167

Answers (1)

Manish Menaria
Manish Menaria

Reputation: 27401

Use .withOption('order', []) to remove the sorting arrows from first column.

Sample :

self.dtOptions = DTOptionsBuilder.newOptions().
                withPaginationType('full_numbers')
                .withOption('order', []);

Upvotes: 1

Related Questions