phpGrid Changelog

What's new in phpGrid 6

Jun 10, 2014
  • enable_edit:
  • Added a 3rd parameter for user defined edit script file name other than the default "edit.php" file. Note that the user defined edit file is NOT automatically passed to detail and subgrid. In most cases, you do not need to use your own edit script rather than simply modify edit.php (requires Enterprise or Universal license for source code).
  • set_col_dynalink:
  • now works with local array
  • cls_database.php:
  • db2-dsnless
  • Now supports DB2 DSN-less as database type. Thanks, Jon Paris!
  • odbc_mssql_native
  • "odbc_mssql_native" DB_TYPE for SQL Server Native ODBC driver
  • "odbc_mssql" should be used for ***DSN-only connectivity *** on *nix, OS X using unixODBC through FreeTDS.
  • unixODBC requires environment variables in conf.php
  • putenv("ODBCINSTINI=/usr/local/Cellar/unixodbc/2.3.1/etc/odbcinst.ini");
  • putenv("ODBCINI=/usr/local/Cellar/unixodbc/2.3.1/etc/odbc.ini");
  • conf.php:
  • Add "PHPGRID" to prefix all DB constant to avoid potential name collisons with other systems and frameworks. eg. Wordpress uses DB_NAME variable.
  • SQL Server:
  • The cells with NULL value repeat the value from the previous row has been fixed due to a bug in ADOdb (server/adodb5/adodb.inc.php), our database abstract class library.
  • before_script_end public variable:
  • Added public variable 'before_script_end'. It can be 'hooked' into the display when ALL the DOM elements are ready.
  • cust_prop_jsonstr (known as ud_params pre-version six)
  • example: filter_grid_on_pageload.php
  • Not that it's NOT possible to use set_grid_property function for the particular filter example because the filters must be passed as string to data.php via POST for the filter to work. However, this example is significant because it's illustrates it is possible to persist search criteria even user navigates to another page and comes back to phpGrid.
  • Example:
  • $dg->cust_prop_jsonstr = 'toppager:true,'; // clone toolbar to top
  • set_grid_property:
  • Parameters:
  • $grid_property: An array represents grid property. The property will add to or overwrite existing properties already defined by phpGrid.
  • Description:
  • Advanced method. Set custom datagrid properties. The parameter must be an array. You must be rather familiar jqGrid API in order to take advantage of this method effectively. In most cases, you do not need to use this method. Note that this method is not the same as set_grid_method, another advanced phpGrid method.
  • Example:
  • $dg -> set_grid_property(array('search'=>true));
  • set_grid_method:
  • It now takes variable arguments. The changes make the function more flexible with different jqGrid methods with variable arguments. Super useful. :)
  • INLINE edit improvement:
  • checkbox now display as checkbox,
  • new blank row when add.
  • auto refresh grid after add.
  • WYSIWYG support
  • set_edit_condition:
  • Set row-level edit condition for edition permission.
  • Composite PK support (Enterprise+):
  • This is a major feature in version 6. Lots of development time devoted to support composite PK, and yet making it simple at the same time. In stead of passing a single string variable in the constructor as the primary key, you can now pass an array of strings as the composite primary key. For a single primary key, you can still use a string or an array with a single string value. e.g.
  • composite primary key:
  • $sdg = new C_DataGrid("SELECT * FROM orderdetails", array("productCode", "orderNumber"), "orderdetails");
  • single primary key:
  • $dg = new C_DataGrid("SELECT * FROM orders", "orderNumber", "orders");
  • OR -
  • $dg = new C_DataGrid("SELECT * FROM orders", array("orderNumber"), "orders");
  • set_col_edittype:
  • Use index number 0 and 1 instead of column name to retrieve data value in "select" edit type. This allows more complex SQL statement such as CONCAT.
  • Conditional format:
  • Fixed bug in subgrid due to "+" column
  • set_masterdetail:
  • The 2rd parameter is finally working as intended. It no longer has to be the same name as the master primary key. It was never implemented.
  • New premium themes! (Enterprise+):
  • aristo
  • cobalt
  • retro
  • You gonna like it!
  • global theme support:
  • THEME global constant in conf.php to set theme for all the grids. The global theme can be overwriten with set_theme
  • load error display:
  • added primvate loadError property. The error occurred during load will be displayed.
  • set_sortablerow:
  • activate sortable row. drag and drop row to sort.
  • toolbar search:
  • Changed default value from "equal" to "contain"
  • jqGrid 4.5.2 support:
  • Updated with latest jqGrid library
  • Subgrid:
  • Now support nested/drill-down subgrid!!
  • FORM & INLINE edit:
  • respects edit_options flags
  • Autocomplete support!
  • enable_columnchooser
  • enable_autowdith:
  • automatically resize based on window width one step closer to an Excel-like editor.
  • enabled_autoheight
  • Supported!
  • datepicker:
  • Display changeMonth and changeYear dropdown
  • DEBUG globally constant:
  • Server error now displays when DEBUG is true in conf.php