notifyDataChange not working with cellTemplate defined

1k views Asked by At

Just starting to work with AngularJS and ui-grid, and I encounter a major issue.

My problem is as following: I use different ui-grid components in the same HTML page. All of those ui-grid components have one specific identifier in common.

For example, let's take 2 ui-grid as example : [ui-grid N°1] identifier is defined in a row entity value. [ui-grid N°2] identifier is defined in a column title name.

One of my requirement: When clicking on the row where the identifier is defined [ui-grid N°1], it shall highlight its entire row [ui-grid N°1] AND the entire column of the other grid [ui-grid N°2] where identifier is also defined.

The row selection isn't an issue and I succeeded to highlight the entire column of the second ui-grid thanks to specific cellClass function and, more important, the

gridApi2.core.notifyDataChange(sourceGridConstants.dataChange.COLUMN);

This worked fine until I had to apply a cellTemplate option to the ui-grid N°2.

cellTemplate:'<span ng-click="grid.appScope.gridCtrl.cellClicked(col)">{{row.entity.name}}</span>'

Now, when firing the notifyDataChange, nothing happens.

If I remove the cellTemplate option, the refresh is done on the grid and the column is highlighted as expected.

Has anyone encountered this issue ? If so, is there any way to refresh the grid with a cellTemplate option defined ?

0

There are 0 answers