50", "right");//自定义日期格式 $objGrid->FormatColumn("afiliation", "Afiliation Date", 10, 10, 0, "100", "center", "date:dmy:/");//编辑时可以自定义为<Select>模式 $objGrid->FormatColumn("status", "Status", 5, 5, 0, "60", "left", "select:1_Single:2_Married:3_Divorced"); //编辑时可以自定义为<CheckBox>模式 $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", "chart:percent:val:31"); $objGrid->checkable(); $objGrid->setHeader(); $objGrid->ajax(''silent''); echo ''<html> <head><title>PHPDataGrid</title></head> <body><div align="center"><br />''; //生成DataGrid $objGrid->grid(); echo ''</div></body></html>'';//关闭数据库连接 $objGrid->desconectar(); ?> 3. 基于Oracle简介对于Oracle的读取主要是把phpmydatagrid.class.php中与MySQL连接的函数修改为Oracle,本篇是通过sqlrelay(可参考http://sqlrelay.sourceforge.net/)进行的Oracle连接,当然也可以使用PHP自带的OCI8模块(效率有些低),修改后另存为phporadatagrid.class.php即可在其他程序(datagrid_for_oracle.php)中调用。以上涉及的所有程序均可在压缩包中找到。 希望对大家有用!原文链接:http://www.cnblogs.com/gnielee/archive/2009/08/11/1543911.html