My team have been trying the following:
$scope.addTest = function () {
var TestRow = {
"name": "xx",
"description": "xx",
"subjectId": 15
};
$scope.gridOptions.selectAll()
var testRowLength = $scope.gridData.push(TestRow);
$scope.gridOptions.selectItem(testRowLength - 1, true);
}
However the last selectItem does not correctly do a select. So we tried the following:
$scope.$apply(function () {
$scope.gridData.push(TestRow);
$scope.gridOptions.selectItem(testRowLength - 1, true);
});
Now we get an error message saying:
Error: $apply already in progress
This problem is posted as an issue on the ng-grid blog but it's only just been posted and we need help with this as soon as possible. I hope someone can give us advice on how we can