HOW TO upgrade DataGrid in PHP AdminPanel

Talk and info about common issues and learn how to do almost anything with ApPHP AdminPanel

Moderators: ne_moj, zewa, vadimako, ne_moj, zewa, vadimako

administrator
Site Admin
Site Admin
Posts: 5976
Joined: Jan 7th, '09, 23:18
Contact:

HOW TO upgrade DataGrid in PHP AdminPanel

Postby administrator » Aug 21st, '09, 08:48

-=NEW VERSIONS=-

From version 3.7.0 upgrade of DataGrid is a fully-automated process. You must only replace the files in modules/datagrid directory with files from the new version.

-=OLD VERSIONS=-

PHP AdminPanel is distributed with embedded PHP DataGrid v.5.0.7 (or one of 5.x.x versions)

This is the short and easy guide to upgrade PHP DataGrid, If you purchased version 6.x.x or later:

1. Remove previous version of PHP DataGrid, that found in modules/datagrid/ .

2. Unarchive and upload new version of PHP DataGrid into this folder.

3. (Relevant for old DataGrid versions <= 6.9.x only)
Open modules/datagrid/scripts/download.php file and replace $file_path = "..."; line of code with next one:

Code: Select all

    // 3. For structure:
    //          pages/
    //          modules/datagrid/scripts/
    $file_path = "../../../pages/".$dir.$file;


4. Clear cache of your browser!
For IE: Tools -> Internet Options -> Browsing History -> Delete
For FF: Tools -> Clear Recent History -> Browsing & Downloading History, Cache

5. (for advanced users - for OLD versions ONLY - not needed for version 3.2.x or above)
Open templates/php_datagrid_file.tpl, compare this file with code_template.php,
that comes with PHP DataGrid archive and add/modify all needed rows of the code. Generally, there are
almost no different in template of code, but the following lines of code may be added to php_datagrid_file.tpl file:

## +-- PostBack Submission Method ---------------------------------------------+
## *** defines postback submission method for DataGrid: AJAX, POST or GET(default)
/// $postback_method = "get";
/// $dgrid->SetPostBackMethod($postback_method);

## +-- Layouts, Templates & CSS -----------------------------------------------+
## *** set layouts: "0" - tabular(horizontal) - default, "1" - columnar(vertical), "2" - customized
## *** use "view"=>"0" and "edit"=>"0" only if you work on the same tables
/// $layouts = array("view"=>"0", "edit"=>"1", "details"=>"1", "filter"=>"1");
/// $dgrid->SetLayouts($layouts);
/// *** $mode_template = array("header"=>"", "body"=>"", "footer"=>"");
/// $details_template = array("header"=>"", "body"=>"", "footer"=>"");
/// $details_template['body'] = "<table><tr><td>{field_name_1}</td><td>{field_name_2}</td></tr></table>";
/// $details_template['footer'] = "<table><tr><td>[ADD][CREATE][EDIT][DELETE][BACK]</td></tr></table>";
/// $dgrid->SetTemplates("","",$details_template);

If you need help or want to order customization for this template, please contact us:
http://www.apphp.com/index.php?page=contact_us

Return to “ApPHP AdminPanel {HOW TO}”