当前位置: 首页>>代码示例>>PHP>>正文


PHP jqGridRender::setPdfOptions方法代码示例

本文整理汇总了PHP中jqGridRender::setPdfOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP jqGridRender::setPdfOptions方法的具体用法?PHP jqGridRender::setPdfOptions怎么用?PHP jqGridRender::setPdfOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jqGridRender的用法示例。


在下文中一共展示了jqGridRender::setPdfOptions方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

$(window).resize(function()
{
        $('#eidgrid').fluidGrid({base:'#ui-dialog-title-eid_dialog', offset:-25});
});


CUSTOM;

$grid->setJSCode($custom);


$oper = jqGridUtils::GetParam("oper");
if($oper == "pdf") {
    $grid->setPdfOptions(array(
        "header"=>true,
        "margin_top"=>25,
        "page_orientation"=>"P",
		"header_logo"=>"../../../../../images/Logo_450x123_24bit_color.jpg",
        // set logo image width
        "header_logo_width"=>45,
        //header title
        "header_title"=>"                         Snare/Windows Event ID Report"
    ));
} 

// Enjoy
$summaryrows=array("Seen"=>array("Seen"=>"SUM")); 
$grid->renderGrid('#eidgrid','#eidpager',true, $summaryrows, null, true,true);
$conn = null;
?>
开发者ID:Russell-IO,项目名称:php-syslog-ng,代码行数:30,代码来源:snare_eid.php

示例2: array

        \$("#mne_dialog").ready(function(){
        // Some magic to set the proper width of the grid inside a Modal window
        var modalWidth = \$("#mne_dialog").width();
        var modalHeight = \$("#mne_dialog").height() - 52;
        \$('#mnegrid').jqGrid('setGridWidth',modalWidth);
        \$('#mnegrid').jqGrid('setGridHeight',modalHeight);
        \$('#mnegrid').fluidGrid({base:'#mne_dialog', offset:-25});
        });
//---------------------------------------------------------------
// END: Mnemonic Select Dialog
//---------------------------------------------------------------


});

\$(window).resize(function()
{
        \$('#mnegrid').fluidGrid({base:'#ui-dialog-title-mne_dialog', offset:-25});
});


CUSTOM;
$grid->setJSCode($custom);
$oper = jqGridUtils::GetParam("oper");
if ($oper == "pdf") {
    $grid->setPdfOptions(array("header" => true, "margin_top" => 25, "page_orientation" => "P", "header_logo" => "../../../../../images/Logo_450x123_24bit_color.jpg", "header_logo_width" => 45, "header_title" => "                         Mnemonics Report"));
}
// Enjoy
$summaryrows = array("Seen" => array("Seen" => "SUM"));
$grid->renderGrid('#mnegrid', '#mnepager', true, $summaryrows, null, true, true);
$conn = null;
开发者ID:Russell-IO,项目名称:php-syslog-ng,代码行数:31,代码来源:mne.php

示例3: PDO

$conn = new PDO(DB_DSN, DB_USER, DB_PASSWORD);
// Tell the db that we use utf-8
$conn->query("SET NAMES utf8");
// Create the jqGrid instance
$grid = new jqGridRender($conn);
// Write the SQL Query
$grid->SelectCommand = 'SELECT OrderID, OrderDate, CustomerID, ShipName, Freight FROM orders';
// Set output 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');
// Set some grid options
$grid->setGridOptions(array("rowNum" => 10, "rowList" => array(10, 20, 30), "sortname" => "OrderID", "caption" => "PDF export with custom header"));
// 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));
$grid->setColProperty("ShipName", array("width" => "250"));
$grid->setColProperty("Freight", array("label" => "Test", "align" => "right"));
// Enable navigator
$grid->navigator = true;
// Enable pdf export on navigator
$grid->setNavOptions('navigator', array("pdf" => true, "add" => false, "edit" => false, "del" => false, "view" => false, "excel" => false));
$oper = jqGridUtils::GetParam("oper");
// prevent some executions when not excel export
if ($oper == "pdf") {
    $grid->setPdfOptions(array("header" => true, "margin_top" => 27, "header_logo" => "logo.gif", "header_logo_width" => 30, "header_title" => "jqGrid pdf table", "header_string" => "by Trirand Inc - www.trirand.net"));
}
// Enjoy
$grid->renderGrid('#grid', '#pager', true, null, null, true, true);
$conn = null;
开发者ID:nong053,项目名称:prototype-nnit,代码行数:31,代码来源:grid.php

示例4: jqGridRender

// Tell the db that we use utf-8
$conn->query("SET NAMES utf8");
// Create the jqGrid instance
$grid = new jqGridRender($conn);
// Write the SQL Query
$grid->SelectCommand = 'SELECT OrderID, OrderDate, CustomerID, ShipName, Freight FROM orders';
// Set output 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');
// Set some grid options
$grid->setGridOptions(array("rowNum" => 10, "rowList" => array(10, 20, 30), "sortname" => "OrderID", "caption" => "PDF export with summary rows"));
// 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));
$grid->setColProperty("ShipName", array("width" => "250"));
$grid->setColProperty("Freight", array("label" => "Test", "align" => "right"));
// Enable navigator
$grid->navigator = true;
// Enable pdf export
$grid->setNavOptions('navigator', array("pdf" => true, "add" => false, "edit" => false, "del" => false, "view" => false, "excel" => false));
// Set summary field
$summaryrows = array("Freight" => array("Freight" => "SUM"));
$oper = jqGridUtils::GetParam("oper");
if ($oper == "pdf") {
    $grid->setPdfOptions(array("header" => true, "margin_top" => 27, "page_orientation" => "P", "header_logo" => "logo.gif", "header_logo_width" => 30, "header_title" => "jqGrid pdf table"));
}
// Enjoy
$grid->renderGrid('#grid', '#pager', true, $summaryrows, null, true, true);
$conn = null;
开发者ID:nong053,项目名称:prototype-nnit,代码行数:31,代码来源:grid.php


注:本文中的jqGridRender::setPdfOptions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。