HTML control Archives | phpGrid - PHP Datagrid Create PHP grids in minutes, not hours. Sat, 30 Nov 2024 00:07:46 +0000 en-US hourly 1 CodeProjecthttps://wordpress.org/?v=7.0.3 129966043 Tagging with autocomplete https://phpgrid.com/example/tagging-with-autocomplete/ Mon, 02 Oct 2017 04:19:30 +0000 https://phpgrid.com/?p=9375

To enable tagging, you can set the type of grid edit control to autocomplete with set_col_edittype(), and set the LAST parameter to true. In the demo below, edit Office Code in the pop-up form to see the tagging feature. 123456789// Always include namespace and conf.php on TOP of the script. use phpCtrl\C_DataGrid; require_once("/file/path/to/conf.php");   $dg […]

The post Tagging with autocomplete appeared first on phpGrid - PHP Datagrid.

]]>

To enable tagging, you can set the type of grid edit control to autocomplete with set_col_edittype(), and set the LAST parameter to true.

In the demo below, edit Office Code in the pop-up form to see the tagging feature.

1
2
3
4
5
6
7
8
9
// Always include namespace and conf.php on TOP of the script.
use phpCtrl\C_DataGrid;
require_once("/file/path/to/conf.php");  

$dg = new C_DataGrid("select employeeNumber, lastName, firstName, isActive, officeCode, extension from employees", "employeeNumber", "employees");
$dg -> enable_edit("FORM", "CRUD");
$dg -> set_col_edittype("officeCode", "autocomplete", "Select officeCode,city from offices",true);
$dg -> enable_search(true);
$dg -> display();

Live Demo

The post Tagging with autocomplete appeared first on phpGrid - PHP Datagrid.

]]>
9375
Grid Edit Types – Select, Checkbox, Textarea, Autocomplete, WYSIWYG, etc. https://phpgrid.com/example/set_col_edittype-2/ Fri, 17 Sep 2010 00:11:24 +0000 http://64.38.236.7/?p=552 After enabling edit, set types of data grid edit controls with set_col_edittype() for any editable column. List of available controls: text textarea select checkbox password autocomplete (version 6+) – New! Text and Textarea are set automatically based on the database access library ADOdb metatype. For WYSIWYG control, use set_col_wysiwyg() method instead. 123// Always include namespace […]

The post Grid Edit Types – Select, Checkbox, Textarea, Autocomplete, WYSIWYG, etc. appeared first on phpGrid - PHP Datagrid.

]]>
After enabling edit, set types of data grid edit controls with set_col_edittype() for any editable column. List of available controls:

  • text
  • textarea
  • select
  • checkbox
  • password
  • autocomplete (version 6+) – New!

Text and Textarea are set automatically based on the database access library ADOdb metatype. For WYSIWYG control, use set_col_wysiwyg() method instead.

1
2
3
// Always include namespace and conf.php on TOP of the script.
use phpCtrl\C_DataGrid;
require_once("/file/path/to/conf.php");
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$dg = new C_DataGrid("select * from employees", "employeeNumber", "Employees");
$dg -> set_col_title("employeeNumber", "Emp No.");
$dg -> set_col_title("lastName", "Last Name");
$dg -> set_col_title("firstName", "First Name");
$dg -> set_col_title("isActive", "Active?");
$dg -> set_col_format("email", "email");
$dg -> enable_edit("FORM", "CRUD");
$dg -> set_row_color("","","#DDEEF5");
$dg -> set_col_hidden('employeeNumber',false);

$dg -> set_col_edittype("isActive", "checkbox","1:0");
$dg -> set_col_edittype("reportsTo", "select", "Select employeeNumber, concat(firstName, ' ', lastName) from employees",false);
$dg -> set_col_edittype("officeCode", "autocomplete", "Select officeCode,city from offices",false);

// alternatively, for select type, you can hard-code the key value pair value
// $dg -> set_col_edittype("officeCode", "select", "1:San Francisco;2:Boston;3:NYC;4:Paris;5:Tokyo;6:Sydney;7:London");

$dg -> display();

See Live Example!

The post Grid Edit Types – Select, Checkbox, Textarea, Autocomplete, WYSIWYG, etc. appeared first on phpGrid - PHP Datagrid.

]]>
552