melai
melai

Reputation: 97

Get selected items from a table with growing threshold SAPUI5

I'm wondering if there is a way to get all the total number of selecteditems of a table with properties growing and growingThreshold set. It seems like the call oTable.getSelectedItems().length only works for items in the table that are on display/visible.

JSBIN Sample

Upvotes: 1

Views: 2263

Answers (3)

R4Ynz
R4Ynz

Reputation: 41

I had the same problem with sap.m.List. What I did was using the returned Listbase from the bindItems function and used the paths from getSelectedContextPaths(). Compared it with the oData and got all selected items. A little bit of a hack. Feel free to suggest something else. Didn't find anything else yet.

Upvotes: 0

techippo.com
techippo.com

Reputation: 255

When growing property is set only visible items are being selected on clicking selectall.So it will return only visible items length.You may have to try for getting all items

ocheckSerialBatchJsonModel.getProperty("/results").length

If you want to get selected items you may have to add a seperate column for checkboxes and bind a property to enabled property of checkbox to json model first.Then you have to loop the entire list.

Upvotes: 0

jsenthusiast
jsenthusiast

Reputation: 1

getGrowingInfo().total will return all items no matter visible or not.

Upvotes: 0

Related Questions