user3048027
user3048027

Reputation: 387

Callback function for Angular ui-grid rendered

I want to know what is the callback function that fires after Angularjs grid is rendered meaning all its cells are rendered a function like $.ready()

Upvotes: 10

Views: 7580

Answers (3)

Sanjay Nishad
Sanjay Nishad

Reputation: 1625

there are two functions you can use, if you want to execute on ui-grid ready then use renderingComplete

onRegisterApi: function(gridApi) {
    gridApi.core.on.renderingComplete($scope, function() {
        //code to execute
    });
}

if you need callback on data change use rowsRendered

onRegisterApi: function(gridApi) {
    gridApi.core.on.rowsRendered($scope, function() {
        //code to execute
    });
}

Upvotes: 7

user3048027
user3048027

Reputation: 387

The figured out the function is $scope.gridApi.core.on.rowsRendered()

Upvotes: 4

hitamu
hitamu

Reputation: 27

Maybe you can use $timeout for your issue

http://jsfiddle.net/8nuwQ/100/

Upvotes: -1

Related Questions