1

I am trying to add a shortlist button to a datagrid (using backgrid.js http://backgridjs.com/)

What i want is the shortlist button takes the id's of all selectedmodels and save them in database.

If i do this this.model.get('id') it takes the id of current row but i want to take the id's of checked check-box's.

When I look closer and use "grid.getSelectedModels", this call returns an empty array.

So how can i get the id's of selectedmodels?

madeeha ameer
  • 479
  • 2
  • 8
  • 22

1 Answers1

0

The only way grid#getSelectedModels is empty is when you are not using SelectAllHeaderCell in combination with SelectRowCell. Is this the case?

Y.H Wong
  • 7,151
  • 3
  • 33
  • 35