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


PHP jqGridRender::setNavEvent方法代码示例

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


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

示例1: function

\t\t\t\turl: 'city.php',
\t\t\t\tdataType: 'json',
\t\t\t\tdata: {q:cntryval},
\t\t\t\tsuccess : function(response)
\t\t\t\t{
\t\t\t\t\tvar t="";
\t\t\t\t\tjQuery.each(response, function(i,item) {
\t\t\t\t\t\tt += "<option value='"+item.id+"'>"+item.value+"</option>";
\t\t\t\t\t});
\t\t\t\t\tjQuery("#City",formid).append(t).removeAttr("disabled");
\t\t\t\t}
\t\t\t});
\t\t}
\t});
}
INITFORM;
// Enable navigator
$grid->navigator = true;
// Enable only editing
$grid->setNavOptions('navigator', array("excel" => false, "add" => true, "edit" => true, "del" => false, "view" => false, "search" => false));
// Close the dialog after editing
$grid->setNavOptions('edit', array("closeAfterEdit" => true, "editCaption" => "Update Customer", "bSubmit" => "Update", "viewPagerButtons" => false));
// Bind the before show Form event in add and edit mode.
$grid->setNavEvent('edit', 'beforeShowForm', $beforeshow);
$grid->setNavEvent('add', 'beforeShowForm', $beforeshow);
// Bind the initialize Form event in add and edit mode.
$grid->setNavEvent('edit', 'onInitializeForm', $initform);
$grid->setNavEvent('add', 'onInitializeForm', $initform);
// Enjoy
$grid->renderGrid('#grid', '#pager', true, null, null, true, true);
$conn = null;
开发者ID:nong053,项目名称:prototype-nnit,代码行数:31,代码来源:grid.php

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