Skip to Content

UI5 - sap.m.Table visible row count

Feb 02, 2017 at 02:38 PM


avatar image


I am working on a project with SAPUI5 and I am stucked with this problem. I have a table on a view and in this table we have several rows. There is a filter function for the table and if the user type in a filter which gives back only one row, then I would like to select that one row automatically. For this I need the numbers of the visible rows I guess and if it is equal 1 then select it or else don't do anything.

Can anybody helps me to solve this problem?

I know that sap.ui.table.Table has rowcounter, and I need a similar solution but with sap.m.Table.

Thank you,


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
VAIBHAV GB Feb 03, 2017 at 06:34 AM


check this example, it will guide you through:

>> gbvaibhav-gist code,

>> Example



Show 1 Share
10 |10000 characters needed characters left characters exceeded


Thank you this works! I don't know how I didn't find this property.

Thank you very much!

Muralidhar Moturu Feb 02, 2017 at 03:00 PM

Hi Herman,

If you can check the count of rows appearing after filter operation.Like a count of array which generated after your filtering operation .you can make that particular row "selected" property to true on the condition the count is only one.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

I do not understand exactly how do you mean this. After my filter operation in the JSON model still there are all of the rows.

Can you explain it or show me a solution please?

Thank you!


I dont know how you are filtering.But if you can find the "Indicies" (Property) array, there you can see the only filtered rows list.