Back

Editing, Updating and Creating Records
canEdit
Show Edit button and allow record updates Default: `false` Also requires the keyTable and keyCol properties to be defined. The icon can be modified in $lens->lang->iconEdit. If you want only selected rows to be editable, you can define an additional column called "_CANEDIT_" and set the value to 0 or 1. Non-zero values means that the row is editable. Available since 2.2.0. For example, set $lens->sql to the following if you want the user to be able to only edit products that begin with 'A' (assuming your database supports CASE) SELECT productname, supplier, unitinstock, unitprice, CASE WHEN substr(productname,1,1) = 'A' THEN 1 ELSE 0 END "_CANEDIT_" FROM products Syntax `$lens->canEdit = Boolean;` Basic:No Advanced/Enterprise:Yes DynamicEdit:Yes [Version 1.0]