'How to change Header name dynamically in AG-Grid React?
I want to change the header icon dynamically(i.e. based on the data coming from back end).
I searched through the internet but didn't find much solution and the documentation doesn't had the clear implementation.
So, I thought to share it here.
Sample Code:
export function ColumDefinition(dataFromAPI) {
return [
{
field: 'abc1',
resizable: true,
flex:1,
headerClass: "xyz1",
lockPosition: true
},
{
field: 'abc2',
width: 140,
headerClass: "xyz2",
lockPosition: true
}
] }
Useful Links:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
