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


PHP jqGridRender::setUserTime方法代码示例

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


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

示例1: 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 EmployeeID, FirstName, LastName, BirthDate FROM employees';
// Set the table to where you add the data
$grid->table = 'employees';
// 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');
$grid->setColProperty('EmployeeID', array("editable" => false));
$grid->setColProperty('BirthDate', array("formatter" => "date", "formatoptions" => array("srcformat" => "Y-m-d H:i:s", "newformat" => "Y-m-d")));
// Set some grid options
$grid->setUserTime("m/d/Y");
$grid->setDatepicker("BirthDate", array("buttonOnly" => false));
$grid->setGridOptions(array("rowNum" => 10, "rowList" => array(10, 20, 30), "sortname" => "EmployeeID"));
// navigator first should be enabled
$grid->navigator = true;
$grid->setNavOptions('navigator', array("add" => false, "edit" => false, "excel" => false, "search" => false, "del" => false, "refresh" => false));
// and just enable the inline
$grid->inlineNav = true;
// disable editing - just adding
$grid->inlineNavOptions('navigator', array("edit" => false));
$grid->callGridMethod("#grid", 'setFrozenColumns');
// Enjoy
$grid->renderGrid('#grid', '#pager', true, null, null, true, true);
$conn = null;
开发者ID:nong053,项目名称:prototype-nnit,代码行数:31,代码来源:grid.php


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