首页
Examples
下载
文档
关于
Language:
Powered by PhpGrid | Template designed by Redline(Spinz )
文档
实 例
简单:一条SQL
简单:指定表名和字段名
简单:查询
简单:显示控制
简单:隐藏行
简单:表单
简单:权限控制
一般:表单字段类型
一般:表单列控制
一般:表单字段附加属性
一般:表单验证
一般:使用在线编辑器
一般:显示多个grid
一般:新增自定义列
一般:更换皮肤
扩展:自定义显示数据
扩展:自定义表单字段
扩展:重写表单
友情链接
代码:
tables = "`customer`"; //aim to-> SELECT `cus_id` ,`cus_name`,`cus_address`,`cus_phone` FROM `customer` $expamle->fields = array("cus_id","cus_userid","cus_name","cus_email","cus_dept","cus_address","cus_phone","cus_pic","cus_memo"); $expamle->fieldDisplays = array("cus_name"=>"Customer's name", "cus_userid"=>"User", "cus_email"=>"Email", "cus_dept"=>"Department", "cus_address"=>"Address", "cus_phone"=>"Phone", "cus_pic"=>"Pictrue", "cus_memo"=>"Memo"); $expamle->title = "List of customer"; $expamle->formTable = "`customer`"; $expamle->formFields = $expamle->fieldDisplays; $expamle->formColsNum = 1; //Set the form for a few columns $user_list = array(1=>"Mark",2=>"Jockson",3=>"Tom",4=>"Sun"); $expamle->formTypes = array('cus_name' =>'text', 'cus_email' => 'text', 'cus_address' => 'simple_editor', 'cus_memo' => 'fckeditor', 'cus_pic' =>'file', 'cus_phone' =>'text', 'cus_userid' => array('select',$user_list), 'cus_dept' => array ('list',array (1=>'HR',2=>'Information',3=>'BI')) ); //use livevalidation1.3 javascript libary //how to use? See http://livevalidation.com/ $expamle->formFieldsValidates = array("cus_name"=>"Presence", "cus_userid"=>"Presence", "cus_email"=>"Email", "cus_phone"=>"Numericality, {minimum: 11}"); $html = $expamle->display(); ?>
Customers
back
, Add form:
here
点击直接运行