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


PHP jqGridRender::setFilterOptions方法代码示例

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


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

示例1: jqGridRender

$grid = new jqGridRender($conn);
// Data from this SQL is 1252 encoded, so we need to tell the grid
// Set the data source to be read from file
$grid->readFromXML = true;
// The first item is the xml file, the second is the query id
$grid->SelectCommand = 'sqlxml.getProducts';
// set the ouput format to XML
$grid->dataType = 'xml';
// Let the grid create the model
$grid->setColModel();
// set labels in the header
$grid->setColProperty("ProductID", array("label" => "ID"));
$grid->setColProperty("ProductName", array("label" => "Name"));
$grid->setColProperty("QuantityPerUnit", array("label" => "Unit"));
$grid->setColProperty("UnitPrice", array("label" => "Unit Price"));
// We can hide some columns
$grid->setColProperty("SupplierID", array("hidden" => true));
$grid->setColProperty("CategoryID", array("hidden" => true));
$grid->setColProperty("UnitsOnOrder", array("hidden" => true));
$grid->setColProperty("ReorderLevel", array("hidden" => true));
$grid->setColProperty("Discontinued", array("hidden" => true));
// 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" => "CategoryID"));
// Enable toolbar searching
$grid->toolbarfilter = true;
$grid->setFilterOptions(array("stringResult" => true));
// Enjoy
$grid->renderGrid('#grid', '#pager', true, null, null, true, true);
$conn = null;
开发者ID:nong053,项目名称:prototype-nnit,代码行数:31,代码来源:grid.php


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