I am using ng-grid of AngularUI-Grid, and having a checkbox for row selection. It gives me a checkbox in header too.
If user selects checkbox in header, I want some event/method to trigger in $scope, is there any way? I thought by specifying :- checkboxHeaderTemplate , I would get toggleSelectAll() method would get called. but it is not happening. Any clue? Also is there any Event or method of $scope which can get called on multiple row selection or un-selection.
$scope.gridOptions = {
data: 'dataList',
enablePaging: true,
showFooter: true,
showFilter: true,
totalServerItems: 'totalVehicles',
pagingOptions: $scope.VehpagingOptions,
filterOptions: $scope.VehfilterOptions.filterText,
showSelectionCheckbox: true,
beforeSelectionChange: $scope.beforeVehicleSelectionChange,
checkboxHeaderTemplate: '<input class="ngSelectionHeader" type="checkbox" ng-show="multiSelect" ng-model="allSelected" ng-change="toggleSelectAll(allSelected, true)"/>'
};