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.

File Upload using PHP Grid

Most awaiting feature of File Upload support is added to the latest build of PHP Grid Control. With just little config settings, you can upload file to a folder on your server. You can also use on_insert / on_update callbacks to store the uploaded content in database or email as per your need.

Following settings are required to add with column definition to make it a upload input box.

$col[“edittype”] = “file”; // render as file
$col[“upload_dir”] = “temp”; // upload here

Step 1: Step 2: Step 3: You can also edit or delete existing uploaded file too.

For more help, see working example (demos/editing/file-upload.php)

This feature is currently offered as a part of premium package and onwards. Customers with active subscription (of upgrade) can get latest build via email request ([email protected]). Those whose subscription period has expired can renew the subscription by ordering again from Download.

Grouping Headers in PHP Grid

Now you can have a grouped headers in phpgrid control. It would help in categorizing your related columns. See screenshot.

The grid configuration is fairly simple, by calling following function with desired parameters.

// group columns header
$g->set_group_header( array(
		    "useColSpanStyle"=>true,
		    "groupHeaders"=>array(
		        array(
		            "startColumnName"=>'name', // group starts from this column
		            "numberOfColumns"=>2, // group span to next 2 columns
		            "titleText"=>'Personal Information' // caption of group header
		        ),
		        array(
		            "startColumnName"=>'company', // group starts from this column
		            "numberOfColumns"=>2, // group span to next 2 columns
		            "titleText"=>'Company Details' // caption of group header
		        )
		    )
		)
	);

This feature is part of premium version and onwards. Customers (with license) can get latest build by sending an email request at [email protected].