0

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.

1

2 Answers 2

1

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%');

Sign up to request clarification or add additional context in comments.

Comments

0

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>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.