Exporting selected Columns & Rows (at Runtime)

Now you can export selected rows and columns at runtime. This means no code change, Export selection options are now on accessible with grid operations toolbar.

Demo: http://phpgrid.org/demo/demos/export/export-selected.php

In demo, select columns using column chooser and rows by multiselect option, then click Export selected button. This will export PDF of selected rows/cols. As the grid exports PDF format, the data table can be printed by your favorite PDF reader.

Export selected Columns and Rows

Enhanced Autocomplete (Typeahead) Integration

We’ve further enhanced PHP Grid and JQuery UI Autocomplete integration.
Types and Steps shows how to integrate database driven type ahead / autocomplete by lookup sql query.

1) Basic Typeahead (single field)

Step1: Set formatter to autocomplete on desired column

$col["formatter"] = "autocomplete"; // autocomplete

Step2: Set format options query. The field in sql aliased ‘v’ will be shown in list

// Fill the name field with query values typeahead
$col["formatoptions"] = array(	"sql"=>"SELECT name as v FROM clients", "update_field"=>"name");

2) Autofill other field.

The field ‘company’ will be filled w.r.t. selected name.

$col["formatoptions"] = array(	"sql"=>"SELECT company as k, name as v FROM clients","update_field"=>"company");

The field aliased ‘k’ will be set in the ‘updated_field’ column (e.g. company)

3) Callback function

Connect a callback function that will auto-fill multiple fields.

$col["formatoptions"] = array(	"sql"=>"SELECT *, name as v FROM clients", "callback"=>"fill_form");

and in html part, define callback JS function.

<script>
function fill_form(data)
{
    jQuery("input[name=gender].FormElement").val(data.gender);
    jQuery("textarea[name=company].FormElement").val(data.company);

    jQuery("input[name=gender].editable").val(data.gender);
    jQuery("textarea[name=company].editable").val(data.company);
}
</script>

References: Sample Code and Live demo

Active license subscription OR those who wish to renew subscription can get updated build by contacting via email ([email protected]).

Integrating Select2 with PHPGrid

Based on several customer’s feedback, We’ve now integrated ‘Select2’ control with PHP Grid.

Now you can use ‘Select2‘ control with PHP Grid’s Add or Update operations. Select2 is a jQuery based replacement for select boxes. It supports searching, with in your large select box data items. It gives behavior similar to ‘Combo-box’ control of Microsoft development tools.

select2-1

select2-2

Active license holders can get their update by emailing [email protected]
One can also refer demos/integration/dropdown-select2.php demo.

New Additions to Form Layout Design

We have made several additions in our customized dialog layout feature.

1) You can have 2, 4, 6 column layout in your Add or Edit dialog forms of PHP Grid.
2) You can also Add sections (sub-titles) within form to separate input data group.
3) A field can span to several columns where required. (e.g. Id)
4) Custom form buttons are also supported. (e.g. Load Default)

If you have some wishlist, feel free to share your suggestions with us at our support email address ([email protected]).

editing_dialog-layout2

Multiple Subgrids at Same level

Hello everyone,

I just added a new feature, that allow you to have multiple subgrids at same level.
Usage is pretty easy, just define 2 grids as detail grid and it’ll be there when expanded.

Multiple subgrids at same level

Active licensed customers can request latest build & demo files via email ([email protected])
That’s all for now!

PS: New version update is coming next … stay tuned.

Custom Dialog Buttons, Multi-Column Grouping, Form Posting

New How-tos have been added based on our valuable customer’s feedback.

Q) How to add custom buttons in add/edit dialogs?
Q) How to post data using JS code?
Q) How to do grouping on more than 1 field?
Q) How to reload parent after new record added in subgrid ?
Q) How to mask a field, for example like this: (NN) NNNN-NNNN ? N stands for number.
Q) How to remove toolbar buttons for add/edit dialog and enable only inline editing?
Q) How to maintain vertical scroll position after grid reload?

Checkout the FAQ page for how-tos.

Bulk Operations in PHP Grid

At instances, we wish to perform an operation on all selected rows at once. For e.g.
– Changing the Status from pending to approved for all selected rows
– Or you may want to send email to all selected records

For such cases, I’ve updated the library to enable the bulk update operations.

The usage is very simple indeed. It works with custom toolbar button along with on_update callback.

 

 

 

 

 

 

Paid customers can request latest build via email.

Column Level Access Control

I’ve added a most requested feature, after which we’ll have more control on the fields (columns) on grid. After that, grid can easily to integrated with any ACL (access control list).

1) If you want a column to be editable on ‘Add Record’ but readonly on Grid Listing and Edit dialog, Set it readonly, in editrules.

$col["editrules"] = array("readonly"=>true);

 

 

 

 

 

 

You can also set certain field readonly, when it contain some specific data
(e.g. when gender == male, make it readonly)

$col = array();
$col["title"] = "Gender";
$col["name"] = "gender";
$col["editable"] = true;
$col["editrules"] = array("required"=>true, "readonly"=>true, "readonly-when"=>array("==","male"));
$cols[] = $col;


2) You can also control which column to display in Grid Listing, View Dialog, Add Dialog and Edit Dialog. For such purpose set “show” attribute of column.

$col["show"] = array("list"=>true, "add"=>true, "edit"=>true, "view"=>false);

 

Complete example of column definition will be as follows.

$col = array();
$col["title"] = "Gender"; // caption of column
$col["name"] = "gender";
$col["editable"] = true;
$col["editrules"] = array("required"=>true, "readonly"=>true);
$col["show"] = array("list"=>true, "add"=>true, "edit"=>true, "view"=>false);
$cols[] = $col;

One can connect these setting in Application’s Access Control List to restrict several columns to display/hidden OR make them editable/readonly.

Paid customers can request latest build via email.