ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Dinamically change the display name of a column

Open odiseo42 opened this issue 13 years ago • 2 comments

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?

odiseo42 avatar May 16 '13 23:05 odiseo42

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.

pro85 avatar May 17 '13 08:05 pro85

Awesome, that did the job perfectly. Thank you!

odiseo42 avatar May 17 '13 15:05 odiseo42