Horizontal scrollbar in ngx-datatable in Angular 7

0
578
Angular

This example shows how to set horizontal and vertical scrollbar in ngx-datatable in Angular 7

Example of Horizontal scrollbar in Angular 7

 <ngx-datatable
            #table
            class="material"
            [headerHeight]="50"
            [limit]="10"
            [scrollbarH]="true"
            [columnMode]="'force'"
            [footerHeight]="50"
            [rowHeight]="'auto'" 
            [rows]="rows" >

[scrollbarH]=”true” will add scrollbar automatically.

Example of Vertical scrollbar in Angular 7

<ngx-datatable
            #table
            class="material"
            [headerHeight]="50"
            [limit]="10"
            [scrollbarV]="true"
            [height]="500"
            [columnMode]="'force'"
            [footerHeight]="50"
            [rowHeight]="'auto'" 
            [rows]="rows" >

[scrollbarV]=”true” will add scrollbar automatically but you need to use height attribute in case of Vertical scrollbar.

LEAVE A REPLY

Please enter your comment!
Please enter your name here