Page 1 of 1

Data Grid with Native Scrolling

Posted: Mon Mar 02, 2015 11:02 pm
by dcpbarrington
Forum,

I need to be able to scroll through data in a Data Grid using the Mobile Native Control Scroller.

I've been able to get the functionality working in the attached Stack, HOWEVER, I cannot get the scroller to go to the very bottom or far right of the DataGrid on Android.
If you look a the Data Grid Scroll bar it shows that there is more data, but the native scroller will not scroll there. If you tap on the DG scroll bar it will take you to the data, but the Native Scroller will not.

Here is my code in the ScrollerDidScroll handler:

Code: Select all

on scrollerDidScroll hOffset, vOffset
   if environment() is not "mobile" then exit scrollerDidScroll
   
   if scrollID is Empty OR scrollGroupID is Empty then
      logSaverError "Scrolled without valid Scroll definition:  " && scrollID && scrollGroupID
      exit scrollerDidScroll
   end if
   
   -- Set the DataGrid Scroll
   put vOffset + 0 into VertOffset  -- Size of the Header
   if VertOffset >= 0 then
      set the dgVScroll of scrollGroupID to VertOffset
   else
      set the dgVScroll of scrollGroupID to 0
   end if
   if hOffset >= 0 then
      set the dgHScroll of scrollGroupID to hOffset
   else
      set the dgHScroll of scrollGroupID to 0
   end if
   
end scrollerDidScroll
I tried to pad the vOffset value by the size of the DataGrid Header, but then you cannot get to the data that is at the top of the DataGrid.

Am I doing something wrong or is this a bug?

Re: Data Grid with Native Scrolling

Posted: Mon Mar 16, 2015 7:12 pm
by dcpbarrington
Haven't heard any response, so it looks like a bug to me.

Created Bug Report 14863 in Quality Center

http://quality.runrev.com/show_bug.cgi?id=14863

Re: Data Grid with Native Scrolling

Posted: Fri Feb 23, 2018 8:14 pm
by sphere
This bug was solved in lc9.0.0DP10.

But is present in LC8.1.9 stable, i've added a comment to the bug report.

I've had an DG with and one without images on Android. The one without images scrolls perfect, the one with images did not scroll and showed only 4 items (exactly fitting into the height of the DG) although there were 6 items when testing. In IDE everything showed but on device no. But dgLines answer 6, so 2 were no shown when scrolling. Test with LC900DP11 worked OK.
Hopefully they will fix it in LC8.1.10 too.