Skip to Content

sap.m.Table scrollToIndex() is not a function

Hello everyone,

the sapui5 api reference says there is a method called scrollToIndex() for sap.m.Table (which borrows from sap.m.ListBase). However, this method does not exist on sap.m.Table.

Is the documentation incorrect, or the implementation? Any ways to get around that?

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Jul 20, 2020 at 07:12 AM

    Christof Steps I just tried it here and it works just fine.

    sap.ui.getCore().byId("__xmlview6--idProductsTable").scrollToIndex(5)

    https://ui5.sap.com/#/entity/sap.m.Table/sample/sap.m.sample.Table

    What is your ui5 version?, could you check it like I did in the above code?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 16, 2020 at 02:55 AM

    Hi Christof,

    The documentation is correct. Inherited methods are not documented in the control itself, you have to go to ListBase to see the documentation for that method.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 20, 2020 at 07:02 AM

    Hello Jhodel,

    I know where to find the documentation for it. The problem is, the method does not exist in code. I cannot call to method scrollToIndex on sap.m.Table, because it is not available.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 20, 2020 at 07:50 AM

    I am using 1.74 and just realized that its not supported in this version. I will upgrade to 1.79. Thanks for your help!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.