Display column in grid but hide when edit
You can hide the column in grid with set_col_hidden method.
However, sometimes users want the other way around; to display in grid but hide when edit. You can use the following:
$dg->set_col_property('COLUMN_NAME', array('editable'=>false,'hidedlg'=>true));