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


PHP jqGridRender::setJSCode方法代码示例

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


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

示例1: 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

示例2: array

// Set the url from where we obtain the data
$grid->setUrl('../grids/email_group.php');
// Change some property of the field(s)
$grid->setColProperty("id", array("editable" => false, "hidden" => true, "width" => 25, "fixed" => true, "label" => "ID"));
$grid->setColProperty("name", array("editable" => true, "width" => 100, "fixed" => true, "label" => "Name"));
$grid->setColProperty("dbsql", array("editable" => true, "edittype" => "textarea", "label" => "SQL", "width" => 750, "fixed" => true, "editoptions" => array("rows" => 10, "cols" => 80)));
// Set alternate background using altRows property
$grid->setGridOptions(array("sortable" => true, "width" => 1024, "height" => 250, "caption" => "Email Group Management", "rownumbers" => true, "rowNum" => 30, "sortname" => "name", "sortorder" => "asc", "toppager" => true, "rowList" => array(10, 20, 30, 50, 100)));
$grid->showError = true;
$grid->navigator = true;
$grid->setNavOptions('navigator', array("pdf" => true, "excel" => true, "add" => true, "edit" => true, "del" => false, "view" => true, "search" => true));
$grid->setNavOptions('view', array("width" => 750, "dataheight" => 500, "viewCaption" => "Email Group Management"));
$grid->setNavOptions('add', array("width" => 750, "dataheight" => 500, "closeOnEscape" => true, "closeAfterAdd" => true, "addCaption" => "Add Course", "bSubmit" => "Add Email Group", "reloadAfterSubmit" => false));
$grid->setNavOptions('edit', array("width" => 750, "dataheight" => 500, "closeOnEscape" => true, "closeAfterEdit" => true, "editCaption" => "Update Course", "bSubmit" => "Update Email Group", "reloadAfterSubmit" => false));
//$grid->toolbarfilter = true;
$grid->callGridMethod('#grid', 'setFrozenColumns');
$grid->callGridMethod('#grid', 'gridResize');
global $htmlcode;
$bindkeys = <<<KEYS

\$("#grid").jqGrid('bindKeys', {"onEnter":function( rowid ) {

                    var rowData = jQuery('#grid').jqGrid ('getRowData', rowid);
} } );
KEYS;
$grid->setJSCode($bindkeys);
$grid->renderGrid('#grid', '#pager', true, null, null, true, true);
$DB = null;
?>

开发者ID:sangikumar,项目名称:IP,代码行数:29,代码来源:email_group.php

示例3: jqGridRender

$grid = new jqGridRender($conn);
// Write the SQL Query
$grid->SelectCommand = 'SELECT OrderID, OrderDate, CustomerID, Freight, ShipName FROM orders';
// set the ouput format to json
$grid->dataType = 'json';
// Let the grid create the model from SQL query
$grid->setColModel();
// Set the url from where we obtain the data
$grid->setUrl('grid.php');
// Set alternate background using altRows property
$grid->setGridOptions(array("rowNum" => 10, "sortname" => "OrderID", "rowList" => array(10, 20, 50), "height" => 'auto', "grouping" => true, "groupingView" => array("groupField" => array('CustomerID'), "groupColumnShow" => array(true), "groupText" => array('<b>{0}</b>'), "groupDataSorted" => true)));
// Change some property of the field(s)
$grid->setColProperty("OrderID", array("label" => "ID", "width" => 60));
$grid->setColProperty("OrderDate", array("formatter" => "date", "formatoptions" => array("srcformat" => "Y-m-d H:i:s", "newformat" => "m/d/Y")));
// Change grouping
$dynamic = <<<DYNAMIC
jQuery("#chngroup").change(function(){
\tvar vl = \$(this).val();
\tif(vl) {
\t\tif(vl == "clear") {
\t\t\tjQuery("#grid").jqGrid('groupingRemove',true);
\t\t} else {
\t\t\tjQuery("#grid").jqGrid('groupingGroupBy',vl);
\t\t}
\t}
});
DYNAMIC;
$grid->setJSCode($dynamic);
// Enjoy
$grid->renderGrid('#grid', '#pager', true, null, null, true, true);
$conn = null;
开发者ID:nong053,项目名称:prototype-nnit,代码行数:31,代码来源:grid.php

示例4: array

$grid->setUrl('detail.php');
// Set some grid options
$grid->setGridOptions(array("rowNum" => 10, "footerrow" => true, "userDataOnFooter" => true, "sortname" => "OrderID", "height" => 110));
// Change some property of the field(s)
$grid->setColProperty("RequiredDate", array("formatter" => "date", "formatoptions" => array("srcformat" => "Y-m-d H:i:s", "newformat" => "m/d/Y"), "search" => false));
// on beforeshow form when add we get the customer id and set it for posting
$beforeshow = <<<BEFORE
function(formid)
{
var srow = jQuery("#grid").jqGrid('getGridParam','selrow');
if(srow) {
\tvar gridrow = jQuery("#grid").jqGrid('getRowData',srow);
\t\$("#CustomerID",formid).val(gridrow.CustomerID);
}
}
BEFORE;
// disable the CRUD buttons when we initialy load the grid
$initgrid = <<<INIT
jQuery("#add_detail").addClass("ui-state-disabled");
jQuery("#edit_detail").addClass("ui-state-disabled");
jQuery("#del_detail").addClass("ui-state-disabled");
INIT;
$grid->setJSCode($initgrid);
$grid->setColProperty("EmployeeID", array("hidden" => false, "width" => 20));
$grid->navigator = true;
$grid->setNavOptions('navigator', array("excel" => true, "add" => true, "edit" => true, "del" => true, "view" => false));
$grid->setNavEvent('add', 'beforeShowForm', $beforeshow);
// Enjoy
$summaryrow = array("Freight" => array("Freight" => "SUM"));
$grid->renderGrid("#detail", "#pgdetail", true, $summaryrow, array((int) $rowid), true, true);
$conn = null;
开发者ID:nong053,项目名称:prototype-nnit,代码行数:31,代码来源:detail.php


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