首页
Examples
下载
文档
关于
Language:
Powered by PhpGrid | Template designed by Redline(Spinz )
文档
实 例
简单:一条SQL
简单:指定表名和字段名
简单:查询
简单:显示控制
简单:隐藏行
简单:表单
简单:权限控制
一般:表单字段类型
一般:表单列控制
一般:表单字段附加属性
一般:表单验证
一般:使用在线编辑器
一般:显示多个grid
一般:新增自定义列
一般:更换皮肤
扩展:自定义显示数据
扩展:自定义表单字段
扩展:重写表单
友情链接
代码:
"Mark", 2=>"Jockson", 3=>"Tom", 4=>"Sun" ); /** * extend Datagrid ,rewrite the public of function * * @author cdwei * */ class myclass extends Datagrid{ //rewrite this function to custom table body public function extendField($name,$fieldHtml) { if( $name=="cus_pic" ){ $fieldHtml = '
'; } if( $name=="cus_userid" ){ $fieldHtml = "
Mark
Jockson
Tom
Sun
"; } return $fieldHtml; } } $expamle = new myclass(); $expamle->tables = "`customer`"; //aim to-> SELECT `cus_id` ,`cus_name`,`cus_address`,`cus_phone` FROM `customer` $expamle->fields = array("cus_id","cus_name","cus_userid","cus_pic","cus_address","cus_phone"); $expamle->fieldDisplays = array("cus_name"=>"Customer's name","cus_userid"=>"User","cus_pic"=>"Pictrue","cus_address"=>"Address","cus_phone"=>"Phone"); $expamle->title = "List of customer"; $expamle->formTable = "`customer`"; $expamle->formFields=$expamle->fieldDisplays; $expamle->formTypes = array('cus_name' => 'text', 'cus_email' => 'text', 'cus_address' => 'text', 'cus_pic' => 'file', 'cus_phone' => 'text', 'cus_userid' => array('select',$GLOBALS['user_list']) ); $html = $expamle->display(); ?>
Customers
back
, Add form:
here
点击直接运行