Where can I get Angular ui-grid selected items

Mlalahoi picture Mlalahoi · Oct 4, 2014 · Viewed 63.8k times · Source

Testing out Angular ui-grid (ng-grid v.3.0). Can not for the life of me find the selected row. I just want to grab the rows or even row ID of row when a user clicks it. Found the top comment here but I think this is outdated: Getting select rows from ng-grid?

Does anyone know where the gridOptions.selectedItems is being stored in 3.0?

Answer

Sycomor picture Sycomor · Oct 4, 2014

Is this what your are looking for ? http://ui-grid.info/docs/#/tutorial/210_selection

  1. Activate grid selection capabilities with the ui-grid-selection tag (and ui.grid.selection module registration in your app
  2. register gridApi and use gridApi.selection to access getSelectedRows()