コード例 #1
2
$(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;
?>
コード例 #2
0
ファイル: mne.php プロジェクト: Russell-IO/php-syslog-ng
        \$("#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;
コード例 #3
0
ファイル: grid.php プロジェクト: nong053/prototype-nnit
$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;
コード例 #4
0
ファイル: grid.php プロジェクト: nong053/prototype-nnit
// 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;