您好,欢迎访问一九零五行业门户网

jqGrid 导出excel表格代码(php+jqgrid实例)_PHP教程

jqgrid 导出excel表格代码(php教程+jqgrid实例)
require_once '../../../tabs.php';
?>
jqgrid php demo
php代码
query(set names utf8);
// create the jqgrid instance
$grid = new jqgridrender($conn);
// write the sql query
$grid->selectcommand = 'select orderid, orderdate, customerid, freight, shipname from longorders';
// set the ouput format to json
$grid->datatype = 'json';
// let the grid create the model
$grid->setcolmodel();
// set the url from where we obtain the data
$grid->seturl('grid.php');
$grid->optimizesearch = true;
// set some grid options
$grid->setgridoptions(array(rownum=>100,sortname=>orderid,height=>150));
// change some property of the field(s)
$grid->setcolproperty(orderdate, array(
    formatter=>date,
    formatoptions=>array(srcformat=>y-m-d h:i:s,newformat=>m/d/y),
    search=>false
    )
);
// enable toolbar searching
$grid->toolbarfilter = true;
$grid->setfilteroptions(array(stringresult=>true));
// enjoy
$grid->rendergrid('#grid','#pager',true, null, null, true,true);
$conn = null;
?>
http://www.bkjia.com/phpjc/444902.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/444902.htmltecharticlejqgrid 导出excel表格代码(php教程+jqgrid实例) require_once '../../../tabs.php'; ? !doctype html public -//w3c//dtd xhtml 1.0 strict//en http://www.w3.org/tr/xhtml1/dtd/xht...
其它类似信息

推荐信息