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
ahmed elbarbary
NA
1.6k
278.2k
How to apply red color font to specific column for dynamic d
May 19 2020 9:48 PM
I work on angular 7 app I need to apply red color font to specific column
but i dont know how to do that ?
I show data dynamically meaning no fixed column or data and code below working without any issue
my main thing i need is if columnname='onlineurl' make font color to red
my code as below datasource on ts as below :
this
._displayreport.GetReportDetailsPaging(
this
.searchData).subscribe((data: any[]) => {
this
.reportdetailslist = data;
this
.headerCols = Object.keys(data[0]);
data.forEach((item) =>{
let values = Object.keys(item).map((key)=> item[key]).filter(item =>item != data[0].totalCount)
this
.contentBody.push(values);
});
});
to get header without data i do as below :
<thead style=
"width: max-content"
>
<tr>
<th *ngFor=
"let coln of headerCols"
>
<ng-container *ngIf=
"coln != 'totalCount'"
>
{{coln}}
</ng-container>
</th>
</tr>
</tr>
</thead>
to get content data without header i do
<tr *ngFor=
"let rep of contentBody"
>
<td *ngFor=
"let r1 of rep"
><span>{{r1}}</span></td>
<td
</tr>
Reply
Answers (
4
)
How to display text field as icon based on condition repor ?
menu click working on report component but report details no