set_col_fileupload() *

* Please note this feature is currently only available for Enterprise and Universal licenses.

  • Parameters:
    • $col_name: column name that stores file name
    • $base_url: base URL to the files
    • $physical_path: specify physical path to the folder where the files are uploaded. When PHP is installed as Apache module, this parameter is optional.
  • Description:
    •  The file upload is seamlessly integrated with the edit form using Ajax, no page refresh ever occurred. Files can be uploaded and deleted right within the form.
  • Remark:
    • A single file upload per datagrid is allowed.
    • FORM edit mode only
    • File system only with valid upload_tmp_dir value in php.ini
    • File name column should allow NULL value
    • $physical_path is automatically obtained if PHP running in Apache module, or MUST be provided as fallback
  • Example:
1
2
3
4
$dg -> set_col_fileupload("fileToUpload", "/phpGridx/FileUploadFolder/", "c:\\xampp\www\\phpGridx\\FileUploadFolder\\");

// if PHP is installed as Apache module, the 3rd parameter, $physical_path, can be ignored
$dg -> set_col_fileupload("fileToUpload", "/phpGridx/FileUploadFolder/");

No related content found.

Tags: ,