Sanket
Sanket

Reputation: 31

Angular data-table horizontal scrollbar

I am using Angular data table and I want to apply horizontal scrollbar. Previously I used jQuery data-tables, its quite easy in jQuery but I didn't find same for Angular data-tables.

Upvotes: 0

Views: 1373

Answers (2)

baumsystems
baumsystems

Reputation: 22

Use the following configurations in your typescript and html template file respectively

dtOptions: any = {};
ngOnInit() {
      this.dtOptions = {
      // other configurations
      scrollX: true,
}
<table datatable [dtOptions]="dtOptions"></table>

Upvotes: 0

Sanket
Sanket

Reputation: 31

Its quite easy with Angular data-tables. Simply add 'dtOptions' to your table. and configure same as follows $scope.dtOptions = DTOptionsBuilder.newOptions().withOption('scrollX', '100%');

Upvotes: 1

Related Questions