Currently, I am utilizing SignalR in conjunction with AngularJS Ag-Grid. Upon receiving a broadcast to the client, I proceed to update the rows within my grid.
hub.client.Update = function (response) {
if (response) {
var positionsResponse = angular.fromJson(response);
$rootScope.$apply(function () {
$scope.response = angular.fromJson(positionsResponse.GridData);
$scope.gridOptions.api.setRowData($scope.response);
});
}
};
An issue arises on the setRowData line, where an error occurs due to the api being undefined. It is important to note that the gridOptions are correctly populated.
Your assistance is greatly appreciated.