Is there a specific reason why the angularjs grid in my sample isn't displaying the selectedItems properly? Every time I attempt to reference the selectedItems, it returns "undefined." I have tested this in both Chrome and IE with identical outcomes.
I have created a plnkr that is based on the "basic" example from the angular grid page, including some additional javascript to try and display the selected items. You can view the plnkr here: http://plnkr.co/edit/wPnMGQOzKSOTdeaAjoB8?p=preview
The relevant code snippet is as follows:
$scope.gridOptions = {
data: 'myData',
selectedItems: $scope.mySelections,
afterSelectionChange: function (row, event) {
if (row.selected) {
alert('Items selected ' + $scope.mySelections);
alert('Items selected ' + $scope.gridOptions.selectedItems)
}
}
};
Whenever I attempt to assess the selected items using $scope.mySelections or directly through the grid, it returns "undefined." I added a "debugger;" line within the "if" statement and confirmed the values - it seems that there is no selectedItems property on the grid?
(edit: removed the ** from the code block. Forgot you can't boldface code here)