You can also use represent to make a link to update your record like this :

In the controller :
db[request.args(0)].id.represent=lambda id:\

 A(T('Access'),_href=URL(r=request,f='read',args=(db[request.args(0)],id)))

Richard

2011/1/11 Kenneth Lundström <kenneth.t.lundst...@gmail.com>

> If I remember correctly the Id field has to be included but you can hide
> it?
>
>
> Kenneth
>
> ----- Ursprungsmeddelande -----
> > yes
> >
> > On Jan 11, 6:00 am, Lisandro <rostagnolisan...@gmail.com> wrote:
> > > I have the following model:
> > >     db.define_table('ciudadanos', Field('tipo'),
> > > Field('nro_documento'), Field('valor'))
> > >
> > > In the view, the following line shows the jqgrid with all the fields
> > > of the table (including "id" field):
> > >     {{=plugin_wiki.widget('jqgrid', db.ciudadanos)}}
> > > The jqgrid shows fine.
> > >
> > > Then, I add the "fields" argument using any subset of fields, for
> > > example:
> > >  * {{=plugin_wiki.widget('jqgrid', db.ciudadanos, fields='id,
> > > nro_documento')}}
> > >  * {{=plugin_wiki.widget('jqgrid', db.ciudadanos, fields='id, tipo,
> > > valor')}}
> > >  * {{=plugin_wiki.widget('jqgrid', db.ciudadanos, fields='id,
> > > valor')}}
> > > Notice that "id" field is always present.
> > >
> > > But when I exclude the "id" field from the "fields" argument, then no
> > > data is shown in the jqgrid. For example:
> > >  * {{=plugin_wiki.widget('jqgrid', db.ciudadanos, fields='tipo,
> > > nro_documento')}}
> > >  * {{=plugin_wiki.widget('jqgrid', db.ciudadanos, fields='valor')}}
> > > In this cases the jqgrid doesn't show data.
> > >
> > > ¿Is it extrictly necessary to include "id" field in jqgrid?
>
>

Reply via email to