Open NABEEL-AHMED-JAMIL opened 7 years ago
@NABEEL-AHMED-JAMIL Have you figured out how to do this? I would like to do this as well. Thanks!
No Dear I'm also Stuck on it.
Well I'm Working on some other project but I think you should try to used this below description may be it's helpful for you.
In html where you put this tag of the table try to used the condition for show color in the tag and in the
onChangeTable() method check the line where he create the row.
Check when code create the one row used the condition if row create add the color value in the tag for bind the color.
Note: Please try this if you find some positive result than please send the the code Thank's
I solved this problem by adding following code in ng-table.components.ts. add style to this td: <td (click)="cellClick(row, column.name, i)" *ngFor="let column of columns" [innerHtml]="sanitize(getData(row, column.name))" [style.color]="getStyle(column.name)" >
make a function in class NgTableComponent public getStyle(propertyName:string) { if(propertyName == "Status"){ return "red"; } else { return ""; } }
Result: Column where name of column is Status is colored.
I want to add the row's with different color like(red , green) and the button also how i add these both think into the (table config array)