Page 1 of 1

Table scrolling problems

PostPosted: Tue Mar 14, 2017 1:54 pm
by TonyP

We have a table that has the 'scrolling' feature enabled. We have a button that adds rows to this table. We are able to scroll this table up and down and it very nicely scrolls on our touch screen and gives a nice bounce effect and all when getting to the end of the scroll.

One problem, however. When I want to add a row, I use table.navigate/table.scroll action to scroll to the last element. This is to make sure the user can see the new row being added, even if it is currently not showing on the screen. This also works nicely. But, when I now try to scroll with my finger back up to the top of the list, it doesn't let me. Further, If I scroll down, the table will go past the end and show empty spaces X pixels in height (where X is height of row * number of rows I scrolled down using the scroll plugin). Is there any way to fix this?



Re: Table scrolling problems

PostPosted: Fri Mar 17, 2017 1:25 pm
by MikeMarchand
Hi Tony,

This problem that you are encountering is because there appears to be a problem when using both scrolling tables and table.scroll actions together. The names do sound as if they should be used together but there is a slight distinction. The table.scroll actions are actually supposed to be used with tables which do not support touch based scrolling.

The solution to your problem may be to use a custom animation which changes the grd_yoffset for your table if you would like to actually scroll to the bottom of the table when adding a new table row.

I have attached a sample application that hopefully demonstrates the same behavior which you are trying to acheive. Let us know if this did the trick or if what you are looking to accomplish is somehow different.

Good Luck,

Re: Table scrolling problems

PostPosted: Wed Mar 29, 2017 2:33 pm
by TonyP
Hi Mike,

Yes, there seems to be an incompatibility there. I have incorporated your sample into a generic animation for all my tables that I have for my application. Thanks for the help!