$objGrid->form('employee', true); $objGrid->searchby("name,lastname"); $objGrid->tabla("employees"); $objGrid->keyfield("id"); $objGrid->datarows(20); $objGrid->orderby("name", "ASC"); $objGrid->FormatColumn("id", "ID Employee", 5, 5, 1, "50", "center", "integer"); $objGrid->FormatColumn("name", "Name", 30, 30, 0, "150", "left"); $objGrid->FormatColumn("lastname", "Last name", 30, 30, 0, "150", "left"); $objGrid->FormatColumn("age", "Age", 5, 5, 0, "50", "right"); $objGrid->FormatColumn("afiliation", "Afiliation Date", 10, 10, 0, "100", "center", "date:dmy:/"); $objGrid->FormatColumn("status", "Status", 5, 5, 0, "60", "left", "select:1_Single:2_Married:3_Divorced"); $objGrid->FormatColumn("active", "Active", 2, 2, 0, "50", "center", "check:No:Yes"); $objGrid->FormatColumn("salary", "Salary", 10, 10, 0, "90", "right", "money:€"); $objGrid->FormatColumn("workeddays", "Work days", 5, 2, 0, "50", "right", "integer"); $objGrid->checkable(); if (!isset($_REQUEST["DG_ajaxid"])) { // If we intercept an AJAX request from page // then do not display data below echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . '<html xmlns="http://www.w3.org/1999/xhtml">' . '<head>' . '<meta http-equiv="Content-Type" content="text/html; charset=$charset" />' . '<meta name="description" content="Site description" />' . '<meta name="revisit-after" content="8 days" />' . '<meta name="keywords" content="keywords for site" />' . '<meta http-equiv="Pragma" content="no-cache" />' . '<meta name="robots" content="all" />' . '<link rel="shortcut icon" href="images/guru.ico" />' . '<meta http-equiv="Content-Script-Type" content="type" />' . '<link type="text/css" rel="stylesheet" href="./css/styles.css" />' . '<title>phpMyDataGrid Test script</title>'; $objGrid->setHeader(); ?> <script type='text/javascript' src='./js/myscripts.js'></script> <link href="../css/styles.css" rel="stylesheet" type="text/css" media="screen" /> <body> <div id='content'> <?php // echo myheader(); // print or insert your own header ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr>