Skip to main content

So I have my row(s) highlighted in/on model using a row action to addClass() and that part works great.

The next thing is to pull the selected row or rows from any given model so what script do I need to use to get the .list.getSelectedItems()


If you mean using a mass action, you can use this to get the Ids :

var Ids = skuid.$.map(arguments[0].list.getSelectedItems(),function(item){    
return item.row.Id;
});



I almost called the post pseudo mass action however the trick is doing multiple different models on a page so looking to get to the list(s) from possibly various sources 

Perhaps understanding how the list gets built would be beneficial ??


Hi Jerry,

There could me multiple lists attached to a particular model, so you’d have to iterate over each one.

Check out the registeredLists property on the model described here.

http://help.skuidify.com/m/11720/l/205447-skuid-model-model

Here is a code snippet that should log each of the selected items on all lists for a model.


skuid.$.each(myModel.registeredLists,function(){<br>&nbsp; &nbsp; console.log(this.getSelectedItems());<br>});



Reply