admin管理员组文章数量:1290942
How to add background in pinnedBottomRowData
the entire bottom Row
here's the code
listponent.ts
columnDefs = new Array();
rowData = new Array();
pinnedBottomRowData: any;
ngOnInit() {
this.columnDefs = [
{
'headerName': 'Style/Machine',
'field': 'total',
}
];
for (let i = 1; i < 30; i++) {
this.rowData.push(
{
'total': 'Machine ' + i
}
);
}
this.pinnedBottomRowData = this.createData(1);
}
createData(count: number) {
const result = [];
for (let i = 0; i < count; i++) {
result.push({
total: 'Total Machine'
},
{
total: 'Total',
});
}
return result;
}
here's the output
How to add background in pinnedBottomRowData
the entire bottom Row
here's the code
list.ponent.ts
columnDefs = new Array();
rowData = new Array();
pinnedBottomRowData: any;
ngOnInit() {
this.columnDefs = [
{
'headerName': 'Style/Machine',
'field': 'total',
}
];
for (let i = 1; i < 30; i++) {
this.rowData.push(
{
'total': 'Machine ' + i
}
);
}
this.pinnedBottomRowData = this.createData(1);
}
createData(count: number) {
const result = [];
for (let i = 0; i < count; i++) {
result.push({
total: 'Total Machine'
},
{
total: 'Total',
});
}
return result;
}
here's the output
Share Improve this question edited Feb 13, 2020 at 14:36 Gilbert Gabriel 4252 gold badges8 silver badges24 bronze badges asked Nov 23, 2019 at 3:47 ABCABC 8326 gold badges20 silver badges45 bronze badges1 Answer
Reset to default 11You can use getRowStyle
and check if the row is pinned and at the bottom. Please refer the below example.
this.getRowStyle = function(params) {
if (params.node.rowPinned === 'bottom') {
return { "background-color": "blue" };
}
};
this.pinnedBottomRowData = createData(1, "Bottom");
Plunker
Reference link
本文标签:
版权声明:本文标题:javascript - How to add background on ag grid pinnedBottomRowData using rowClass in aggrid angular - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741515654a2382871.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论