You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by bilbosax <wa...@comcast.net> on 2016/10/02 16:33:05 UTC

Datagrid on a Mobile Device

My desktop AIR application is finally complete and I now need to copy the
logic over to a mobile AIR platform. Even though it is not recommended, I
need to use a Datagrid on mobile. The problem is that there is just too much
information to publish at once on a mobile device. I don't like Datagrid
horizontal scrolling on a mobile device, it feels sloppy to me. Is there a
way using a "previous" and "next" button that I could scroll horizontally a
full page of the Datagrid at a time? Or will I have to do it manually i.e.
Create several datagrids and change their visibility using the "previous"
and "next" button?



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Datagrid-on-a-Mobile-Device-tp13702.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Datagrid on a Mobile Device

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> I'm curious, why does Adobe recommend not to use a datagrid on mobile?  Is
> it too heavy of a component, or is there a more technical reason?

A bit of both, moe that it wasn’t optimised for small mobile screen and touch interaction.

> Was it only a concern on early mobile devices, but now they are more powerful, it
> is less of a concern?

Yes.

Thanks,
Justin

Re: Datagrid on a Mobile Device

Posted by bilbosax <wa...@comcast.net>.
I will check those options out as well.  The way that the final application
played out is that I will not be downloading 50k records at a time, but
merely a maximum of 250 records at any given time.  So it is not a terribly
long record set to look at, but a fairly WIDE record set and difficult to
lay out nicely for a mobile device.

I'm curious, why does Adobe recommend not to use a datagrid on mobile?  Is
it too heavy of a component, or is there a more technical reason? Was it
only a concern on early mobile devices, but now they are more powerful, it
is less of a concern?



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Datagrid-on-a-Mobile-Device-tp13702p13709.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Datagrid on a Mobile Device

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> Also a very good idea that I will look into further.  I am using the Spark
> Data grid

You can get at and change the horizontal and vertical scroll positions. grid.layout.verticalScrollPosition / grid.layout.horizontalScrollPosition off top of my head. The grid.ensureCellIsVisible() may also help as it can scroll to a position.

Probably not an option but the MX data grid is considerably faster when scrolling horizontally, particularly for large datasets. It also has methods like scrollPositionToIndex() that can set the position vertically and horizontally.

Thanks,
Justin



Re: Datagrid on a Mobile Device

Posted by bilbosax <wa...@comcast.net>.
Also a very good idea that I will look into further.  I am using the Spark
Datagrid



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Datagrid-on-a-Mobile-Device-tp13702p13707.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Datagrid on a Mobile Device

Posted by Nemi <ne...@gmail.com>.
I have not tried this, but maybe you could get "next" effect by changing
"dataField"s columns property? Maybe refresh() would be necessary to reload
data, or invalidateCell()

Which exactly datagrid component are you using?



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Datagrid-on-a-Mobile-Device-tp13702p13706.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Datagrid on a Mobile Device

Posted by bilbosax <wa...@comcast.net>.
Thanks OmPrakash!  I didn't even know you could add or delete columns once
the datagrid was instantiated.  This is a good idea because it will allow me
to leave the main identifying column on the screen at all times so the user
knows exactly what they are looking at.  I will look into this more.  Any
other suggestions, or does everyone agree that this is this best approach?



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Datagrid-on-a-Mobile-Device-tp13702p13705.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Datagrid on a Mobile Device

Posted by OmPrakash Muppirala <bi...@gmail.com>.
For horizontal scrolling you will need to add and remove columns when
next/prev is pressed.  For vertical scrolling you simply need to update the
dataprovider.
I dont think you need to create more than one dataprovider at any point.

Thanks,
Om

On Sun, Oct 2, 2016 at 9:33 AM, bilbosax <wa...@comcast.net> wrote:

> My desktop AIR application is finally complete and I now need to copy the
> logic over to a mobile AIR platform. Even though it is not recommended, I
> need to use a Datagrid on mobile. The problem is that there is just too
> much
> information to publish at once on a mobile device. I don't like Datagrid
> horizontal scrolling on a mobile device, it feels sloppy to me. Is there a
> way using a "previous" and "next" button that I could scroll horizontally a
> full page of the Datagrid at a time? Or will I have to do it manually i.e.
> Create several datagrids and change their visibility using the "previous"
> and "next" button?
>
>
>
> --
> View this message in context: http://apache-flex-users.
> 2333346.n4.nabble.com/Datagrid-on-a-Mobile-Device-tp13702.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>