I want to scroll to end of the grid when data is loaded. But the code is not working. Please help
$scope.addData = function () {
var n = $scope.gridOptions.data.length + 1;
$scope.gridOptions.data.push({
"type":"student",
"is_job_ready":"true",
"is_night_shift":"true"
});
$scope.scrollTo($scope.gridOptions.data.length -1,0)
};
$scope.scrollTo = function( rowIndex, colIndex ) {
$scope.gridApi.core.scrollTo( $scope.gridOptions.data[rowIndex],$scope.gridOptions.columnDefs[colIndex]);
};