Hi i need to add in my grid a button who send an email with attachment and some filds on the grid, theres some easy way do this? or example code?
Thank you
Hello,
If you need button with each row, easiest solution would be to make a virtual column that has hyperlink to your php page with all row data as querystring.
In that page, you can have code to email and get row data from querystring.
You can use column name placeholder in url: id={id}&col2={col2}&col3={col3}
# Custom made column to show link, must have default value as it's not db driven
$col = array();
$col["title"] = "Email";
$col["name"] = "email";
$col["width"] = "30";
$col["align"] = "center";
$col["search"] = false;
$col["sortable"] = false;
# no new line in this html, only space. otherwise it may break ui of grid
$buttons_html = "<a target='_blank' href='email.php?id={id}&col2={col2}&col3={col3}' style='text-decoration:none; white-space:none; border:1px solid gray; padding:2px; position:relative; width:25px; color:red'>Email</a>";
$col["default"] = $buttons_html;
$cols[] = $col;