dgrid with dojox.mobile.ScrollableView

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

dgrid with dojox.mobile.ScrollableView

klng@intersoln.com
Hi,


I've place a dgrid in a dojox.mobile.ScrollableView and on a desktop
browser the scrollbar works as it should but when viewing the same page
on my mobile (iPhone), the scrollbar is missing.

Can anyone shred some light on this matter? And, how it can be
resolved?

Thanks in advance.

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: dgrid with dojox.mobile.ScrollableView

dylanks
Could you please let us know the following:

* Version of Dojo
* Version of dgrid (and which features you have enabled)
* Version of iOS

iOS does tend to hide scrollbars, but is the grid still scrollable for
you? For example, the test at
http://dgrid.io/js/dgrid/test/mobile_grid.html does not show a scrollbar
for me, but it is scrollable.

Regards,
-Dylan

on 1/16/17, 02:12 (GMT-07:00) [hidden email] said the following:

> Hi,
>
>
> I've place a dgrid in a dojox.mobile.ScrollableView and on a desktop
> browser the scrollbar works as it should but when viewing the same page
> on my mobile (iPhone), the scrollbar is missing.
>
> Can anyone shred some light on this matter? And, how it can be
> resolved?
>
> Thanks in advance.
>
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Co-Founder, Dojo Toolkit
CEO, SitePen, Inc.  http://www.sitepen.com/
Reply | Threaded
Open this post in threaded view
|

Re: dgrid with dojox.mobile.ScrollableView

neekfenwick
In reply to this post by klng@intersoln.com
On 16/01/17 16:12, [hidden email] wrote:
> Hi,
>
>
> I've place a dgrid in a dojox.mobile.ScrollableView and on a desktop
> browser the scrollbar works as it should but when viewing the same page
> on my mobile (iPhone), the scrollbar is missing.

dgrid is scrollable already, if you set its height, isn't it?  I would
guess you either want to:
- put the dgrid in a simple View, and let dgrid handle the scrolling for you
- or stick with your current approach, make the dgrid be 'auto height'
i.e. its full height and let the ScrollableView do the scrolling

Having a dgrid inside a ScrollableView sounds like a combination of two
widgets that both attempt to support scrolling.

When I have a dgrid on a page, I usually listen for the app-resize event
and rearrange the height of the dgrid myself, i.e. in a View that has a
dojox/mobile/Heading at the top and a dgrid filling the rest of the page:

init: function(){
     var self = this;
     this.app.on('app-layoutView', function (params) {
         if (params.view === self) {
             var ss = common.getScreenSize(),
                 headingHeight = domGeom.getMarginBox(self.heading.domNode),
                 remainingHeight = ss.h - headingHeight.h;
             domStyle.set(self.myDgrid.domNode, 'height',
remainingHeight + 'px');
         }
     });

Nick
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: dgrid with dojox.mobile.ScrollableView

klng@intersoln.com
In reply to this post by klng@intersoln.com
Hi Dylan,

Thanks for your help.

Below are the version that I used.

> * Version of Dojo
-- 1.12.1
> * Version of dgrid (and which features you have enabled)
-- 1.1.0
> * Version of iOS
-- 10.2

I've also confirmed that I'm able to scroll the dgrid once I change
ScrollableView to a normal View. Looks like they shouldn't co-exist..

Best Regards



> ------------------------------
>
> Message: 2
> Date: Mon, 16 Jan 2017 05:45:15 -0700
> From: Dylan Schiemann <[hidden email]>
> Subject: Re: [Dojo-interest] dgrid with dojox.mobile.ScrollableView
> To: [hidden email]
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Could you please let us know the following:
>
> * Version of Dojo
> * Version of dgrid (and which features you have enabled)
> * Version of iOS
>
> iOS does tend to hide scrollbars, but is the grid still scrollable
> for
> you? For example, the test at
> http://dgrid.io/js/dgrid/test/mobile_grid.html does not show a
> scrollbar
> for me, but it is scrollable.
>
> Regards,
> -Dylan
>
> on 1/16/17, 02:12 (GMT-07:00) [hidden email] said the following:
>> Hi,
>>
>>
>> I've place a dgrid in a dojox.mobile.ScrollableView and on a desktop
>> browser the scrollbar works as it should but when viewing the same
>> page
>> on my mobile (iPhone), the scrollbar is missing.
>>
>> Can anyone shred some light on this matter? And, how it can be
>> resolved?
>>
>> Thanks in advance.
>>
>
>
> ------------------------------
>
> ________________
> Dojo Toolkit: http://dojotoolkit.org/
> Tutorials: http://dojotoolkit.org/documentation/
> Reference Guide: http://dojotoolkit.org/reference-guide
> API Documentation: http://dojotoolkit.org/api
>
> [hidden email]
> To unsubscribe, visit:
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
>
>
> End of Dojo-interest Digest, Vol 145, Issue 4
> *********************************************

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: dgrid with dojox.mobile.ScrollableView

klng@intersoln.com
In reply to this post by klng@intersoln.com
Hi Nick,

Thanks for your help and code.

When I set the dgrid to auto height, the grid was not exactly visible,
I believe the height has been reset to 1px or some value less than 5px
cause I am able to see the dgrid border. That's all.

I've also confirmed that I'm able to scroll the dgrid once I change
ScrollableView to a normal View. Looks like they shouldn't co-exist..


Best Regards

> ------------------------------
>
> Message: 5
> Date: Tue, 17 Jan 2017 19:28:25 +0700
> From: Nick Fenwick <[hidden email]>
> Subject: Re: [Dojo-interest] dgrid with dojox.mobile.ScrollableView
> To: [hidden email]
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=windows-1252; format=flowed
>
> On 16/01/17 16:12, [hidden email] wrote:
>> Hi,
>>
>>
>> I've place a dgrid in a dojox.mobile.ScrollableView and on a desktop
>> browser the scrollbar works as it should but when viewing the same
>> page
>> on my mobile (iPhone), the scrollbar is missing.
>
> dgrid is scrollable already, if you set its height, isn't it?  I
> would
> guess you either want to:
> - put the dgrid in a simple View, and let dgrid handle the scrolling
> for you
> - or stick with your current approach, make the dgrid be 'auto
> height'
> i.e. its full height and let the ScrollableView do the scrolling
>
> Having a dgrid inside a ScrollableView sounds like a combination of
> two
> widgets that both attempt to support scrolling.
>
> When I have a dgrid on a page, I usually listen for the app-resize
> event
> and rearrange the height of the dgrid myself, i.e. in a View that has
> a
> dojox/mobile/Heading at the top and a dgrid filling the rest of the
> page:
>
> init: function(){
>      var self = this;
>      this.app.on('app-layoutView', function (params) {
>          if (params.view === self) {
>              var ss = common.getScreenSize(),
>                  headingHeight =
> domGeom.getMarginBox(self.heading.domNode),
>                  remainingHeight = ss.h - headingHeight.h;
>              domStyle.set(self.myDgrid.domNode, 'height',
> remainingHeight + 'px');
>          }
>      });
>
> Nick
>
>

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest