How do I display a button in the grid based on some condition. Say for exampla, I want to display attachment button if there is any attachement exist with the row
1 Answers
You can have callback function, that will allow you to display based on row data. For e.g. with that column settings …
$col["on_data_display"] = array("display_attach","");
function display_attach($data)
{
// check column name path_url and show link if not empty.
$p= $data["path_url"];
if (empty($p)) return "None";
else return "<a href='$p'>Download</a>";
}
Your Answer