forked from angular-ui/ui-grid
-
Notifications
You must be signed in to change notification settings - Fork 2
Grid Events
timothyswt edited this page Feb 6, 2013
·
9 revisions
ng-grid emits events up the scope to anyone who decides to listen to them:
When the grid data source is changed this event is fired letting you know that data was successfully modified.
$scope.$emit('ngGridEventData', newData);
When the filter is changed this event is fired.
$scope.$emit('ngGridEventFilter', newFilterText);
When new rows are rendered in the grid: (scrolling fires this a lot)
$scope.$emit('ngGridEventRows', newRows);
When anyone groups the data
$scope.$emit('ngGridEventGroups', newGroups);
When sorting happens (see src/classes/column.js) this way you can detect wether or not the column is visible/ what direction it is sorted etc..
$scope.$emit('ngGridEventSorted', SortedColumn);
When Columns are re-rderd you get an [] of all the columns in their current state.
$scope.$emit('ngGridEventColumns', newColumns);