TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mallesh kumar
NA
328
53.1k
How to add horizontal scroller to Mat-table in angular
Dec 10 2018 1:51 PM
How to add horizontal scroller to Mat-table( angular material ) in angular. and columns automatically adjusted.
<div class="mat-elevation-z8">
<mat-table #table [dataSource]="dataSource" style="overflow-x:scroll;">
<ng-container *ngFor="let thisCol of columnNames; let colIndex = index" matColumnDef="{{thisCol}}">
<mat-header-cell *matHeaderCellDef> {{thisCol}} mat-header-cell>
<mat-cell *matCellDef="let element"> {{element[thisCol]}} mat-cell>
ng-container>
<mat-header-row *matHeaderRowDef="columnNames">mat-header-row>
<mat-row *matRowDef="let row; columns: columnNames;">mat-row>
mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 20]" showFirstLastButtons>mat-paginator>
div>
The below error i'm getting cloumn names should be set properly. Please help me out.
Reply
Answers (
2
)
Bind dropdownlist selected value to another dropdownlist?
consuming asp.net mvc web service in angularjs using $http