option to move smartgrid buttons to the left side

161 views
Skip to first unread message

Adi

unread,
Jan 21, 2012, 8:13:05 AM1/21/12
to web...@googlegroups.com

is there a possibility to choose if smartgrid buttons (edit, delete, ...) display on the left or far right side? would be useful lock in buttons, but let the grid grow on the right side if user wants horizontal scroll for rarely used data.

thanks,
Adi

szimszon

unread,
Jan 21, 2012, 9:37:53 AM1/21/12
to web...@googlegroups.com
Or the buttons in the right side could be next to the data fields and not in the scrollable area...

Adi

unread,
Feb 8, 2012, 7:05:10 PM2/8/12
to web...@googlegroups.com
Still have to ask one more time about this possibility, or something else that would help for mobile viewing of smartgrid. Just opened the application on iPad and all is perfect, actually IMPRESSIVE. But on the android phone, I couldn't scroll horizontally to reach buttons and that is a problem.

Is there anything to do to make smartgrid usable on the android phone? (not sure how it behaves on iPhone)

Thanks,Adnan

Ross Peoples

unread,
Feb 9, 2012, 7:45:57 AM2/9/12
to web...@googlegroups.com
I was wondering about the previously. I haven't tried this yet, but as a temporary workaround, are you able to insert buttons using JavaScript?

Adi

unread,
Feb 9, 2012, 10:32:13 AM2/9/12
to web...@googlegroups.com
Thanks Ross. I'm not sure how to do it, plus to assign the same functionality as existing buttons. Do you have some sample from your code?

Just tried the application also on the iphone, and (smartgrid) horizontal scroll doesn't work there either... Practically, can't reach buttons :)

Anyone else has the similar problem, or advice that could help?


peter

unread,
Feb 9, 2012, 12:57:54 PM2/9/12
to web2py-users
I use sqlform.grid, I use 'links' for edit and delete. These appear as
buttons on the right hand column. I have no problem accessing these
buttons on my android phone. Are you sure you are attributing the
problem correctly? My web2py website is identical on my android phone
to what appears on a computer. I have not had to do anything special
to achieve this. The website is ukjazz.net. I cannot direct you to the
edit buttons unforunately as these are just used by me for admin.

If you send me a link to your site I can see what happens on my
android phone.

Peter

Adi

unread,
Feb 9, 2012, 3:05:49 PM2/9/12
to web...@googlegroups.com
Hi Peter...

I put a simple smartgrid together, with a longer text field... so this one doesn't scroll horizontally for me. I'm not sure if it's something that we did on css or somewhere, but i noticed it worked on ipad as it should...

here is the link:
http://w2p.thanedev.com/test2/test/test/test1

Thanks,
Adnan

peter

unread,
Feb 9, 2012, 4:42:35 PM2/9/12
to web2py-users
Yes, I can not move right on your app. But surely the solution is to
find out your css's problem with android rather than move the buttons
to the left. There might be other reasons for the having the buttons
on the left, but buttons on the right work fine with android if one
can move right.

Peter

Adi

unread,
Feb 9, 2012, 10:09:36 PM2/9/12
to web...@googlegroups.com
Thanks Peter... still looking, and tried even some other applications, with original css, but didn't manage to scroll horizontally. If anyone has any ideas, please share :)

Having an option to have buttons either on the left or right side, was just a suggestion... Our Customer Service and Call Center agents move quickly from order to order, and need many fields (name, phone #, several dates, etc) up front in smartgrid, so buttons get pushed into the scrolling area. It would help having them on the left, but there are other bigger things to finalize now :) What's impressive is how much can be accomplished through grid and smartgrid. Fantastic core component of the framework!

Anyway, thanks for your help.

Adi

Adnan Smajlovic

unread,
Oct 5, 2012, 10:18:29 PM10/5/12
to web...@googlegroups.com
thanks Mark for this. will save and use it...

On Fri, Oct 5, 2012 at 5:02 PM, Mark <czhan...@gmail.com> wrote:
I met the same problem and found a solution. I changed the id field into a button, and actually, any fields can be buttons or links in the grid.

For example:
db.person.id.represent=lambda id,r: DIV(A('View',_class='button',_href=URL('table',args=['person','view','person',r.id])), _class='row_buttons')
db.person.name.represent=lambda name,r: A(r.name,_href=URL('table',args=['person','edit','person',r.id]))

Reply all
Reply to author
Forward
0 new messages