I am attempting to implement a check that allows deletes only under some circumstances. I figured I would do this via the ondelete arg in the grid. Unfortunately I have run into a few stumbling blocks with this:

1/ The 1.99.4 code is busted - references 'ret' before it is defined

Fortunately a simple fix (I think you guys have done something like this in trunk) -

sqlhtml.py:1294
            if ondelete:
                #ondelete(table,request.args[-1],ret)
                ondelete(table,request.args[-1])

2/ The ondelete function is only called from the main grid delete action, not the delete checkbox in edit mode

I would be great if the logic could be applied there too - otherwise I guess I can workaround by switching the delete option off in the edit screen.


3/ Am unclear about how to signal back that I want delete to stop

I figure I am just being dense in this case, but ondelete function accepts table and row id variables (not a form) so I don't see any way to set the form's error status.

Thanks for your help

Mark

Reply via email to