Hello,
i'm trying to make powertable's in-line editing work but it doesn't
seem to be working.(it's the powertable plug-in for Web2py)
I've been looking for answers and i'm currently using the code Bruno
Rocha suggested in another topic:

in Default.py:
def editablefunction():
    id = request.vars.row_id
    column = request.vars.column
    db(db.order_lines.id==id).update(column=value)

(in powertable section, other lines in the section are irrelevant to
this matter:)
powerTable.extrajs = dict(autoresize={},tooltip={},
editable={'editablecallback':'URL("default","editablefunction")'})

and the returned table in view : {{=table}}

The returned table displays the rows out of the order_lines database
like it should,no problem there, and they are clickable and become
editable when you do so, except the changes you make are NOT saved to
your database, they just returns to normal (the value already in the
database) after hitting enter.
What is the best way to fix this or what is a good alternative ? (i'm
quite new to this)
Thanks in advance

Note:
if it's any help, the database is db.order_lines, it has 3
fields .orders, .product and .amount, but only amount should be
editable.
.product and .orders are linked to two other databases and should not
be editable.

Reply via email to