shagrin shagrin - 1 year ago 135
Javascript Question

Ng-Grid will collapse rows after data refresh, how to prevent that?

I am using Ng-Grid with grouping option, where groups are collapsed by default.
Each row of data has a link to perform some operation on it. After operation is done, grid should refresh data. This part works fine.

The problem is with aggregation: after data refresh, all rows get collapsed. This is really annoying.

Is there any possibility to expand specific group after data refresh?
I tried:




But that didn't work.

Example Plunker with grid configuuration can be found here

Answer Source

If anyone struggles with the same problem, here is how I fixed that:

$scope.$on('ngGridEventData', function () {

The key is 'ngGridEventData'.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download