documentation Archives | phpGrid - PHP Datagrid Create PHP grids in minutes, not hours. Sat, 11 Nov 2023 05:51:51 +0000 en-US hourly 1 CodeProjecthttps://wordpress.org/?v=7.0.3 129966043 composer install common issues https://phpgrid.com/documentation/composer-install-common-issues/ Fri, 15 Sep 2023 14:10:00 +0000 https://phpgrid.com/?p=10138 Since introduction of composer install in version 7.5.3, it has been an excellent way for dependencies management while minimizing file distribution size. Users can keep dependencies updated by running composer update without reaching out to us, a win-win. This post will document composer-related common issues reported by our users and remedies to address those issues. […]

The post composer install common issues appeared first on phpGrid - PHP Datagrid.

]]>
Since introduction of composer install in version 7.5.3, it has been an excellent way for dependencies management while minimizing file distribution size. Users can keep dependencies updated by running composer update without reaching out to us, a win-win.

This post will document composer-related common issues reported by our users and remedies to address those issues.

PHPExcel (deprecated) has now been replaced by PHPSpreadsheet. It requires two PHP extensions, depending versions of PHP, sometime they are not enabled by default. If they are missing, you are like to encounter the following error messages during composer install.

1
2
- Root composer.json requires phpoffice/phpspreadsheet ^1.29 -> satisfiable by phpoffice/phpspreadsheet[1.29.0].
- phpoffice/phpspreadsheet 1.29.0 requires ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.

To enable extensions, verify that the following are enabled in your php.ini files:

– extension=gd
– extension=zip

You can also run `php –ini` in a terminal to see which files are used by PHP in CLI mode. Alternatively, but not recommended, you can run Composer with –ignore-platform-req=ext-gd to temporarily ignore these required extensions if you are sure they are already enabled.

Remember always to restart web server after making any changes in php.ini.

The post composer install common issues appeared first on phpGrid - PHP Datagrid.

]]>
10138
set_ws_editurl()* https://phpgrid.com/documentation/set_ws_editurl/ Sun, 15 Aug 2021 03:10:39 +0000 https://phpgrid.com/?p=9790 * Available in commercial versions for IBM i DB2 only Details on IBM i RESTful Web Services Parameter(s): $edit_url: IBM i web service URL for edit $delete_url: URL to IBM i web service for delete Description: Integrated Web Services for IBM i Web services for building IBM i applications. This function sets URL for both […]

The post set_ws_editurl()* appeared first on phpGrid - PHP Datagrid.

]]>
* Available in commercial versions for IBM i DB2 only

Details on IBM i RESTful Web Services

  • Parameter(s):
    • $edit_url: IBM i web service URL for edit
    • $delete_url: URL to IBM i web service for delete
  • Description:
    • Integrated Web Services for IBM i Web services for building IBM i applications. This function sets URL for both edit and delete to web services.
  • Example:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// file_get_contents() context options
$arrContextOptions=array(
  "ssl"=>array(
    "verify_peer"=>false,
    "verify_peer_name"=>false,
  ),
);

// fetch data from API
$url = "https://example.com:440/web/services/GetAllCustomers/";
$json = file_get_contents($url, false, stream_context_create($arrContextOptions));
$json_output = json_decode($json, true);

// load grid
$dg = new C_DataGrid($json_output['CUSTOMER_IORcdsDS'], "CUSTNO", "CUSTOMER_IORcdsDS");

$dg->enable_edit('FORM');

// set WS edit end point (edit, delete)
$dg->set_ws_editurl(
  'https://example.com:440/web/services/UpdateCustomer/updtcustno',
  'https://example.com:440/web/services/DeleteCustomer/dltcust'
);

$dg->display();

The post set_ws_editurl()* appeared first on phpGrid - PHP Datagrid.

]]>
9790
enable_dnd_grouping() https://phpgrid.com/documentation/enable_dnd_grouping/ Thu, 21 Nov 2019 19:33:16 +0000 http://phpgrid.com/?p=9556 * Please note this feature is only available in commercial licenses. Parameter(s): $dnd_grouping: boolean to enable/disable drag and drop grouping Description: Enable on the fly drag and drop grouping Example: 1$dg -> enable_dnd_grouping(true);

The post enable_dnd_grouping() appeared first on phpGrid - PHP Datagrid.

]]>
* Please note this feature is only available in commercial licenses.

  • Parameter(s):
    • $dnd_grouping: boolean to enable/disable drag and drop grouping
  • Description:
    • Enable on the fly drag and drop grouping
  • Example:
1
$dg -> enable_dnd_grouping(true);

The post enable_dnd_grouping() appeared first on phpGrid - PHP Datagrid.

]]>
9556
set_col_datetime() https://phpgrid.com/documentation/set_col_datetime/ Sat, 22 Sep 2018 16:05:28 +0000 http://phpgrid.com/?p=9453 * Currently only supported in the commercial licenses  The function is almost identical to set_col_date() except it also has a time picker. Parameters: $col_name: column name $srcformat: source date format, eg. “Y-m-d” $newformat: new date form to be displayed, eg. “m/d/Y” $datepicker_format: datepicker format, eg. “m/d/yy” Description:  Helper function to format the date using PHP […]

The post set_col_datetime() appeared first on phpGrid - PHP Datagrid.

]]>
* Currently only supported in the commercial licenses 

The function is almost identical to set_col_date() except it also has a time picker.

  • Parameters:
    • $col_name: column name
    • $srcformat: source date format, eg. “Y-m-d”
    • $newformat: new date form to be displayed, eg. “m/d/Y”
    • $datepicker_format: datepicker format, eg. “m/d/yy”
  • Description:
    •  Helper function to format the date using PHP date format options (http://php.net/manual/en/function.date.php). MySql always stores the date in either ‘YYYY-MM-DD’ or ‘YY-MM-DD’ format. However, we can still change the front-end date display format while conforming to its date standards.
  • Remark:
    • In most cases, you don’t need to call this method because phpGrid automatically formats the data with corresponding data type including the date.
    • Only use this method in order to display date format that is different from default date format.
    • To display time only, please use set_col_property instead.
  • Example:
1
2
// Display datetimepicker. Used when data is DATETIME type.
$dg -> set_col_datetime("myDateTime");

The post set_col_datetime() appeared first on phpGrid - PHP Datagrid.

]]>
9453
enable_pagecount() https://phpgrid.com/documentation/enable_pagecount/ Thu, 28 Sep 2017 12:20:32 +0000 http://phpgrid.com/?p=9392 * This function is available in commercial licenses. Parameters: $page_count: boolean: true or false. Description: Enable page count in the pager. Default to true. Set to false to optimize performance for very large (e.g. millions) database table. Example:   1$dg -> enable_pagecount(false);

The post enable_pagecount() appeared first on phpGrid - PHP Datagrid.

]]>
* This function is available in commercial licenses.
  • Parameters:
    • $page_count: boolean: true or false.
  • Description:
    • Enable page count in the pager. Default to true. Set to false to optimize performance for very large (e.g. millions) database table.
  • Example:

 

1
$dg -> enable_pagecount(false);

The post enable_pagecount() appeared first on phpGrid - PHP Datagrid.

]]>
9392
form_only() * https://phpgrid.com/documentation/form_only/ Mon, 17 Oct 2016 00:33:58 +0000 http://phpgrid.com/?p=9038 * Please note Form-only mode is only available in paid versions. It is supported from version 7.0 and above. Parameter(s): none Description: Display the add form only without the datagrid. The form will remain on the screen and reset after each successful submit. Remark: Must call enable_edit(‘FORM’) prior to form_only(). Example: 1$dg -> enable_edit('FORM') -> form_only();

The post form_only() * appeared first on phpGrid - PHP Datagrid.

]]>
* Please note Form-only mode is only available in paid versions. It is supported from version 7.0 and above.

  • Parameter(s):
    • none
  • Description:
    • Display the add form only without the datagrid. The form will remain on the screen and reset after each successful submit.
  • Remark:
    • Must call enable_edit(‘FORM’) prior to form_only().
  • Example:
1
$dg -> enable_edit('FORM') -> form_only();

The post form_only() * appeared first on phpGrid - PHP Datagrid.

]]>
9038
add_form_tooltip() https://phpgrid.com/documentation/add_form_tooltip/ Fri, 14 Oct 2016 00:33:59 +0000 http://phpgrid.com/?p=9041 Parameter(s): $col_name: Name of column name for the tooltip $tooltip_text: Tool tip text $symbol: Tooltip symbol. Default to (?) with CSS class name “tooltip_sym” Description: Display tool tip for a specified column in modal form. The default tooltip CSS class name is “tooltip_sym”. Example: 1$dg -> add_form_tooltip('email', 'Got mail?');

The post add_form_tooltip() appeared first on phpGrid - PHP Datagrid.

]]>
  • Parameter(s):
    • $col_name: Name of column name for the tooltip
    • $tooltip_text: Tool tip text
    • $symbol: Tooltip symbol. Default to (?) with CSS class name “tooltip_sym”
  • Description:
    • Display tool tip for a specified column in modal form. The default tooltip CSS class name is “tooltip_sym”.
  • Example:
  • 1
    $dg -> add_form_tooltip('email', 'Got mail?');

    The post add_form_tooltip() appeared first on phpGrid - PHP Datagrid.

    ]]>
    9041
    add_form_group_header() https://phpgrid.com/documentation/add_form_group_header/ Fri, 14 Oct 2016 00:33:59 +0000 http://phpgrid.com/?p=9040 Parameter(s): $before_col_name: Name of column name before which display group header text $text: Group header text Description: Display text before specified column in modal form. Example: 1$dg -> add_form_group_header('employeeNumber', 'Employ Details');

    The post add_form_group_header() appeared first on phpGrid - PHP Datagrid.

    ]]>
  • Parameter(s):
    • $before_col_name: Name of column name before which display group header text
    • $text: Group header text
  • Description:
    • Display text before specified column in modal form.
  • Example:
  • 1
    $dg -> add_form_group_header('employeeNumber', 'Employ Details');

    The post add_form_group_header() appeared first on phpGrid - PHP Datagrid.

    ]]>
    9040
    load_form() https://phpgrid.com/documentation/load_form/ Fri, 14 Oct 2016 00:33:58 +0000 http://phpgrid.com/?p=9043 * Paid version only.  Supported from version 7.0 and above. Parameter(s): $key: A database table primary key value. Description: Load an existing record from DB and display in edit form without the datagrid. The form will remain on the screen after submit. Remark: Must call enable_edit(‘FORM’) and form_only() first Only can be used in conjunction with form_only() Example: 1$dg […]

    The post load_form() appeared first on phpGrid - PHP Datagrid.

    ]]>
    * Paid version only.  Supported from version 7.0 and above.

    • Parameter(s):
      • $key: A database table primary key value.
    • Description:
      • Load an existing record from DB and display in edit form without the datagrid. The form will remain on the screen after submit.
    • Remark:
    • Example:
    1
    $dg -> enable_edit('FORM') -> form_only() -> load_form(8888);

    The post load_form() appeared first on phpGrid - PHP Datagrid.

    ]]>
    9043
    redirect_after_submit() https://phpgrid.com/documentation/redirect_after_submit/ Fri, 14 Oct 2016 00:33:58 +0000 http://phpgrid.com/?p=9042 Parameter(s): $url: Redirect URL Description: Redirect form after submit. Remarks: It does not validate whether the submit is successful. Example: 1$dg -> redirect_after_submit('http://php.net')

    The post redirect_after_submit() appeared first on phpGrid - PHP Datagrid.

    ]]>
  • Parameter(s):
    • $url: Redirect URL
  • Description:
    • Redirect form after submit.
  • Remarks:
    • It does not validate whether the submit is successful.
  • Example:
  • 1
    $dg -> redirect_after_submit('http://php.net')

    The post redirect_after_submit() appeared first on phpGrid - PHP Datagrid.

    ]]>
    9042