本文整理匯總了PHP中GridConnector::set_options方法的典型用法代碼示例。如果您正苦於以下問題:PHP GridConnector::set_options方法的具體用法?PHP GridConnector::set_options怎麽用?PHP GridConnector::set_options使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GridConnector
的用法示例。
在下文中一共展示了GridConnector::set_options方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: GridConnector
<?php
require_once "../config.php";
$res = mysql_connect($mysql_server, $mysql_user, $mysql_pass);
mysql_select_db($mysql_db);
require "../../codebase/grid_connector.php";
$grid = new GridConnector($res);
$grid->dynamic_loading(100);
/*$filter1 = new OptionsConnector($res);
$filter1->render_table("countries","item_id","item_id(value),item_nm(label)");
$grid->set_options("item_nm",$filter1);*/
$filter1 = new OptionsConnector($res);
$filter1->render_table("countries", "item_id", "item_id(value),item_nm(label)");
$grid->set_options("item_nm", $filter1);
$grid->render_table("grid50000", "item_id", "item_nm,item_cd");
示例2: GridConnector
<?php
require_once "../config.php";
$res = mysql_connect($mysql_server, $mysql_user, $mysql_pass);
mysql_select_db($mysql_db);
require "../../codebase/grid_connector.php";
$grid = new GridConnector($res);
$grid->enable_log("temp.log", true);
$grid->dynamic_loading(100);
/*$filter1 = new OptionsConnector($res);
$filter1->render_table("countries","item_id","item_id(value),item_nm(label)");
$grid->set_options("item_nm",$filter1);*/
$grid->set_options("item_nm", array("1", "two", "3"));
$grid->set_options("item_cd", array("91" => "one", "75" => "two"));
$grid->sql->set_transaction_mode("record");
$grid->render_table("grid50", "item_id", "item_nm,item_cd");
示例3: change_filter
<?php
require_once "../config.php";
$res = mysql_connect($mysql_server, $mysql_user, $mysql_pass);
mysql_select_db($mysql_db);
require "../../codebase/grid_connector.php";
$grid = new GridConnector($res);
$grid->enable_log("temp.log", true);
$grid->dynamic_loading(100);
function change_filter($set)
{
$ind = $set->index("item_ch");
if ($ind !== false) {
$set->rules[$ind]["value"] = $set->rules[$ind]["value"] == "checked" ? 1 : 0;
print_r($set->rules[$ind]["value"]);
die;
}
}
$grid->event->attach("beforeFilter", "change_filter");
//$grid->set_options("item_nm",array("1","two","3"));
$grid->set_options("item_ch", array("checked" => true, "unchecked" => true));
$grid->render_table("countries", "item_id", "item_nm,item_cd,item_ch");