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


PHP Grid::addControl方法代码示例

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


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

示例1: load_companies

$table_list = new Table();
$table_list->setColumnsStyle("86dip;100%");
//Controls in grid.
$image = new InputImage();
$image->setClass("image.List");
$name = new InputText();
$name->setClass("input.title");
$address = new InputText();
$table_info = new Table();
$table_info->addControl($name, 1, 1, 1, 1, "Left", "Bottom");
$table_info->addControl($address, 2, 1);
$table_list->addControl($image, 1, 1);
$table_list->addControl($table_info, 1, 2);
$list->addData(load_companies());
$list->addSearch($name);
$list->addControl($table_list, 1, 1);
$list->onTap(action());
$canvas->addPosition($list, "0", "100%", "0", "100%", "0", "0", 0);
$canvas->addPosition($img_add, "100%", "60dip", "97%", "60dip", "15dip", "3%", 1);
$mainTable->addControl($canvas, 1, 1);
$win->addControl($mainTable);
function load_companies()
{
    $url = "http://demo.kikapptools.com/CRMManager/crud/getCompanies.php";
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array(array("CompanyId" => DataType::Numeric(8), "CompanyName" => DataType::Character(100), "CompanyImage" => DataType::Character(200), "CompanyAddress" => DataType::Character(200)));
    Data::FromJson($struct, $result);
    $id = new InputNumeric();
    foreach ($struct as $company) {
        $id = $company['CompanyId'];
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:31,代码来源:list_companies.php

示例2: load_grid

$name = new InputText();
$name->setClass("input.Title");
$date = new InputDate();
$date->setClass("input.Common");
$statusIcon = new Image();
$statusIcon->setImage("img/tick.png");
$statusIcon->setClass("image.ListIcon");
$statusIcon->onTap(changeToDone());
$table_list = new Table();
$table_list->addControl($name, 1, 1, 1, 6, "Left", "Middle");
$table_list->addControl($date, 1, 2, 1, 2, "Left", "Middle");
$table_list->addControl($statusIcon, 1, 3, 1, 1, "Middle", "Middle");
$table_grid->addControl($table_list, 1, 1);
$table_grid->onTap(detail());
//Add controls to main screen
$list->addControl($table_grid);
$table->addControl($list);
$win->addControl($table);
$win->Render();
function load_grid()
{
    //Make JSON request
    $url = "http://demo.kikapptools.com/taskManager/crud/getTask.php?status=" . $statusList . "&period=" . $period;
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    //Cast response data type
    $struct = array(array("id" => DataType::Numeric(6), "task" => DataType::Character(150), "status" => DataType::Numeric(1), "created_at" => DataType::Character(20)));
    Data::FromJson($struct, $result);
    //Add result to screen vars
    foreach ($struct as $items) {
        $id = $items['id'];
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:31,代码来源:TodoLits.php

示例3: changeView

$title->setAutoGrow(true);
$image = new InputImage();
$image->setClass("image.roundedListImage");
$desc = new InputText(300);
$desc->setClass("input.textDescription");
$price = new InputText(10);
$price->setClass("input.priceList");
$table_desc = new Table();
$table_desc->setRowsStyle("25dip;35dip;25dip");
$table_desc->setClass("tableProduct");
$table_desc->addControl($title, 1, 1);
$table_desc->addControl($desc, 2, 1);
$table_desc->addControl($price, 3, 1);
$table_grid->addControl($image, 1, 1);
$table_grid->addControl($table_desc, 1, 2);
$grid->addControl($table_grid);
$table->addControl($grid);
$win->addControl($table);
$win->Render();
function changeView()
{
    $win->Open("ProductThumbList", $cat);
}
//Grid load function
function grid_load()
{
    $url = "http://demo.kikapptools.com/magento/apiKikApp/Products.php?cId=" . $cat;
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array(array("id" => DataType::Numeric(6), "name" => DataType::Character(150), "description" => DataType::Character(300), "pirce" => DataType::Character(10), "thumb" => DataType::Character(200), "stock" => DataType::Character(50), "href" => DataType::Character(300)));
    Data::FromJson($struct, $result);
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:31,代码来源:ProductList.php

示例4: action_prod

$title_prod->setAutoGrow(true);
$image_prod = new InputImage();
$image_prod->setClass("imageImageList2");
$desc_prod = new InputText(300);
$desc_prod->setClass("attributeTextGray");
$price_prod = new InputText(10);
$price_prod->setClass("attributeTextPrice");
$table_desc_prod = new Table();
$table_desc_prod->setRowsStyle("25dip;35dip;25dip");
$table_desc_prod->setClass("tableProduct");
$table_desc_prod->addControl($title_prod, 1, 1);
$table_desc_prod->addControl($desc_prod, 2, 1);
$table_desc_prod->addControl($price_prod, 3, 1);
$table_grid_product->addControl($image_prod, 1, 1);
$table_grid_product->addControl($table_desc_prod, 1, 2);
$grid->addControl($table_grid_product);
$table->setRowsStyle("100%");
$table->addControl($grid, 1, 1);
$win->addControl($table);
function action_prod()
{
    $win->Open("product_detail", $id_prod, $title_prod, $desc_prod, $price_prod);
}
function grid_load_products()
{
    $url_prod = "http://www.demo.kikapptools.com/magento/apiGecko/productos.php?cId=0";
    //the server url
    //Remember to configurate your server url on the Manifest.xml on <services>
    $httpClient_prod = new httpClient();
    $result_prod = $httpClient_prod->Execute('GET', $url_prod);
    //you get a JSON
开发者ID:KikAppTools,项目名称:KikAppExamples,代码行数:31,代码来源:main.php

示例5: action

 */
$win = new SDPanel();
$win->setCaption("Categories");
$table = new Table();
$list = new Grid();
$list->addData(load_grid());
$list->setEmptyGridText("No items available");
$list->onTap(action());
$id = new InputNumeric();
$name = new InputText();
$name->setClass("input.categories");
$table_list = new Table();
$table_list->setHeight("60dip");
$table_list->setClass("table.categorias");
$table_list->addControl($name, 1, 1, 1, 1, "Left", "Middle");
$list->addControl($table_list, 1, 1, 1, 1, "Left", "Middle");
$table->addControl($list, 1, 1);
$win->addControl($table);
$win->Render();
function action()
{
    $win->Open("SubCategories", $id, $name);
}
function load_grid()
{
    $url = "http://demo.kikapptools.com/magento/apiKikApp/Categories.php";
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array(array("id" => DataType::Numeric(6), "name" => DataType::Character(150)));
    Data::FromJson($struct, $result);
    foreach ($struct as $product) {
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:31,代码来源:Categories.php


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