ui-grid
ui-grid copied to clipboard
Dinamically change the display name of a column
Hi,
I'd like to be able to dinamically change the displayName of a column.
columnDefs: [
{field: 'docIdentifier', displayName: 'I'd like to change the name of this later'},
is that currently possible, or can anyone suggest a workarounf?
It's can do with current version(2.0.5)
In grid options set columnDefs: 'columnDefs()'
In controller scope add method columnDefs that return column def array.$scope.columnDefs = function(){return [];}
NgGrid add deep $watch on columnDef as string and after changing data columns will be rebuild.
Awesome, that did the job perfectly. Thank you!