877-GRID-666 24/7 online support 604, Tower A, New Trade Plaza, N.T., Hong Kong

Tagging with autocomplete

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
$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