get_display()

  • Parameters:
    • $add_script_includeonce: true or false. Whether or not to include script header.
  • Description:
    • It returns the grid body with options to include script header. It is useful for MVC framework integration such as Joomla! and Drupal.
  • Remark:
    • The get_display() function should be called AFTER display() is called so that the grid body and header is saved to an internal output buffer that can be later retrieved by get_display().

Example:

1
2
3
4
5
6
7
8
9
$dg = new C_DataGrid("SELECT * FROM orders", "orderNumber", "orders");
$dg -> display(false);  // do not render display
$grid = $dg -> get_display(false);  // do not include required javascript libraries until later with with display_script_includeonce method.

// other page content goes here
/* ........................... */

$dg -> display_script_includeonce();
echo $grid;

No related content found.

Tags: , ,