I am using ngx-datatable to display my data, and i dont want to show horizontal scroll bar so i need to word wrap the column name so that i can reduce the width of columns and eventually remove horizontal scroll bar
I tried to add this css so that it gets wrapped but it seems not to work
.ngx-datatable.fixed-header .datatable-header .datatable-header-inner .datatable-header-cell {
overflow: hidden !important;
text-overflow: ellipsis !important;
white-space: normal !important;
text-align: center !important;
vertical-align: middle !important;
}
I tried to use word-break as well, but that is also not working.
This is my HTML
<ngx-datatable style="height: 410px" class="material" [rows]="assignedTinYearsList" [columns]="assignedTinYearsListColumns" [sortType]="'multi'"
[columnMode]="'standard'" [headerHeight]="50" [footerHeight]="50" [rowHeight]="50" [limit]="10" [scrollbarV]="true" [scrollbarH]="true">
</ngx-datatable>
and this is the column name list
this.assignedTinYearsListColumns = [
{ 'name': 'TIN Year Name', 'prop': 'tinYearName', 'cellTemplate': this.tinYearLinkColumnTpl },
{ 'name': 'TIN', 'prop': 'tin', 'cellTemplate': this.tinLinkColumnTpl },
{ 'name': 'CMS Quality Rep. Type', 'prop': 'reportingType' },
{ 'name': 'CMS IA Rep. Type', 'word-wrap': 'break-word', 'prop': 'iaReportingType' },
{ 'name': 'MFFS Billing', 'prop': 'mffsBilling', 'width': '100', 'cellTemplate':this.provdetailmffsyesNoColumnTemplate},
{ 'name': 'Quality Goal Exclusion', 'word-wrap': 'break-word', 'prop': 'qualityGoalsExclusion','width': '170', 'cellTemplate': this.qualityCheckBoxColumnTpl },
{ 'name': 'Quality Exclusion Reason', 'overflow-wrap': 'break-word', 'prop': 'qualityExclusionReason', 'width': '192', 'cellTemplate': this.QualityDropShowReason },
{ 'name': 'IA Goal Exclusion', 'prop': 'goalExclusion','width': '130', 'cellTemplate': this.checkBoxColumnTpl },
{ 'name': 'IA Exclusion Reason', 'prop': 'exclusionReason', 'width': '192', 'cellTemplate': this.DropShowReason },
];
I need to wrap the size of column name such as 'Quality Goal Exclusion'. Request for suggestions.