Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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()

like image 944
user3048027 Avatar asked Apr 01 '16 09:04

user3048027


2 Answers

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
    });
}
like image 116
Sanjay Nishad Avatar answered Oct 22 '22 12:10

Sanjay Nishad


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

like image 33
user3048027 Avatar answered Oct 22 '22 10:10

user3048027