Skip to content

phpGrid insert error - Need to hide primary key during edit

To hide column in both datagrid and form, set the second parameter to false. This is useful to hide the auto increment primary key field from edit form.

See remark section please:

In addition, set the column name to be read only to prevent saving of any particular field.

You can also use set_col_propertt() method
$dg -> set_col_property("COL_NAME", array("editable"=>0));

$dgCustom -> set_col_property("SCCIID", array("editable"=>0));

Feedback and Knowledge Base