Skip to Content

UI5 - sap.m.Table visible row count

Hello,

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,

Istvan

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Feb 03, 2017 at 06:34 AM

    Hey,

    check this example, it will guide you through:

    >> gbvaibhav-gist code,

    >> Example

    regards

    GB

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Istvan Herman

      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.