예제 #1
0
#if really desired, a filter box can be used for all fields
$tblDemo->addAjaxFilterBoxAllFields();
#i can set the size of the filter box
//$tblDemo->setAjaxFilterBoxSize('fldField1', 3);
#i can format the data in cells however I want with formatFieldWithFunction
#this is arguably one of the most important (visual) functions
$tblDemo->formatFieldWithFunction('fldField1', 'makeBlue');
$tblDemo->formatFieldWithFunction('fldField2', 'makeBold');
//$tblDemo->modifyFieldWithClass("fldField1", "zip required"); 	//for testing masked input functionality
//$tblDemo->modifyFieldWithClass("fldField2", "phone");			//for testing masked input functionality
//$tblDemo->onAddExecuteCallBackFunction("mycallbackfunction"); //uncomment this to try out an ADD ROW callback function
$tblDemo->deleteText = "delete";
?>
		<div style="float: left">
			Total Returned Rows: <b><?php 
echo $tblDemo->insertRowsReturned();
?>
</b><br />
		</div>

		<div style="clear:both;"></div>

<?php 
#actually show the table
$tblDemo->showTable();
#my self-defined functions used for formatFieldWithFunction
function makeBold($val)
{
    if ($val == "") {
        return "no value";
    }