Hello,
thanks for the wonderful and professional support, always fast and efficient.
Currently I have only found a way to export the entire contents of the grid. E 'can export to pdf is only one record in the grid?
thanks
It is not supported as a feature. Alternate is to have a custom button or link (custom-button.php) that redirect flow to a new php page with passing PK of row, and do single row export operation there using some PDF lib.
A simplest PDF export lib could be dompdf http://code.google.com/p/dompdf/
You just create html output and pass to this lib, which generates PDF of that html.
Regards,
I had already thought of this solution but my obstacle is how to move the contents of each record that I want to print
With each link you can have URL querystring as row's pk.
See external-link.php for more help.
For ref.
$col["link"] = "http://localhost/?id={id}"; // e.g. http://domain.com?id={id} given that, there is a column with $col["name"] = "id" exist
$col["linkoptions"] = "target='_blank'"; // extra params with <a> tag
Here is sample column definition.
$col = array();
$col["title"] = "Export";
$col["name"] = "export_single";
$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='http://www.domain.com/export-record.php?id={id}'>Export</a>";
$col["default"] = $buttons_html;
Where export-record.php will be the file handling pdf export work and _GET["id"] will be the row id. (assuming "id" is valid column name in grid column definition)