I have a column for notes. I don\’t want to show it in the grid but I do want the user to know there are notes. Any way to show and * orĀ Yes instead of the note until they open it window to edit. This way they know something is in the field. I can just make the field small but it looks with only the first word showing.
1 Answers
You can have a new column alias in the grid that will be readonly and shown only on listing for Yes / No. e.g.
$g->select_command = "SELECT ...., IF(LENGTH(note) > 0, 'Yes', 'No') as HasNotes ... FROM table";
And in column definition,
$col["name"] = "HasNotes"; $col["title"] = "Notes"; $col["editable"] = false; $col["show"] = array("list"=>true, "edit"=>false, "add"=>false, "view"=>false); $cols[] = $col;
And for the original Notes columns, you can hide it on listing:
$col["name"] = "Notes"; $col["show"] = array("list"=>false, "edit"=>true, "add"=>true, "view"=>true);
Hope it help.
This worked great, Thanks!
Your Answer