Glad to share.

It's the same method used by the grid to parse requests.  I copped it
from the source code.

There's a lot to be learned from the grid/smartgrid source code.

On Dec 15, 7:33 pm, Nik Go <nikolai...@gmail.com> wrote:
> Great! Thanks Cliff
>
>
>
>
>
>
>
> On Thursday, December 15, 2011, Cliff wrote:
> > You can differentiate based on the request, like this:
>
> > if len(request.args) > 2 and request.args[-3] == 'edit':
> >  fields = [] # what you want to show for editing
> > else:
> >  fields = [] # what you want to show on the initial grid
>
> > form=SQLFORM.grid(blah, ... fields=fields ...)
>
> > This is handy for lots of things.  Beware of this, though:
>
> > if len(request.args) > 1 and request.args[-2]=='new':
>
> > Anyway, you get the picture.
>
> > On Dec 14, 11:19 pm, Nik Go <nikolai...@gmail.com <javascript:;>> wrote:
> > > Is there a parameter to specify initial fields to display in a grid and
> > > still display the rest of the viewable fields only when the record is
> > > accessed?
>
> > > For example, I would like the grid to initially show: field1, field2,
> > > field3,field4 but when the view button is clicked it will display all
> > > viewable fields field5, field6, field7, fieldetc.
>
> > > Tried the fields parameter, but after hitting the view button it only
> > > displays the specified fields.

Reply via email to