877-GRID-666 24/7 online support 604, Tower A, New Trade Plaza, N.T., Hong Kong


  • Parameter(s):
    • $type: Export type can be EXCEL, PDF, CSV, or HTML. The default is EXCEL
    • $PDF_logo: Array. Requires Enterprise version 6.53+. It contains properties for
      • image logo file path,
      • width (optional)
      • height (optional)
      • static text (optional)
  • Description:
    • When export is enabled, the export icon appears in the grid footer. The datagrid can be exported in EXCEL, PDF, CSV or HTML format. The Excel is exported in native Excel XML format.  More formats will be supported in the future.
    • PDF export can take one array parameter for its logo. The second parameter can have logo file path, and optional width and height. When width and height are not defined, their values are based on 1/4 of actual logo image integer dimension.
  • Example:

Export in Excel

$dg -> enable_export('EXCEL');

Export in PDF with a logo image (PDF logo requires Enterprise version 6.53+)

$count = $dg->db->num_rows($dg->db->db_query('SELECT * FROM orders'));
$pdf_prop = array(realpath('../logos/phpgrid-logo.jpg'), 50, 15, $count);
$dg -> enable_export('PDF', $pdf_prop);