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


PHP Grid::addData方法代码示例

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


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

示例1: load_companies

$img_add->onTap(insert());
$list = new Grid();
$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();
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:31,代码来源:list_companies.php

示例2: SDPanel

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("");
$table = new Table();
$table->setClass("tableGray");
$grid = new Grid();
$table_grid_product = new Table();
$table_grid_product->setClass("tableGrid");
$table_grid_product->setRowsStyle("80dip");
$table_grid_product->setColumnsStyle("35%;65%;15dip");
$table_grid_product->setHeight("85dip");
$grid->addData(grid_load_products());
//the main use of the grid is to load data from a server
$grid->onTap(action_prod());
//what happens when you tap on it
//inputs and controls
$title_prod = new InputText(150);
$title_prod->setClass("attributetitleList");
$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");
开发者ID:KikAppTools,项目名称:KikAppExamples,代码行数:31,代码来源:main.php

示例3: ButtonBar

$btn_fifteen_days->onTap(nextFifteenDays());
$btn_thirty_days = new ButtonBar();
$btn_thirty_days->setCaption("Next thirty days");
$btn_thirty_days->setClass("image.actionBarIcon");
$btn_thirty_days->onTap(nextThirtyDays());
$barGroup->addControl($btn_today);
$barGroup->addControl($btn_seven_days);
$barGroup->addControl($btn_fifteen_days);
$barGroup->addControl($btn_thirty_days);
$bar->addControl($barGroup);
$win->addControl($bar);
//Items List definition
$table = new Table();
$table->setClass("table.Menu");
$list = new Grid();
$list->addData(load_grid());
$list->setEmptyGridText("Your list is empty");
$list->addSearch($name);
$table_grid = new Table();
$table_grid->setClass("table.DetailMain");
//Items definition
$id = new InputNumeric();
$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();
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:31,代码来源:TodoLits.php

示例4: Table

$btn_img->setCaption("");
$btn_img->setImage("img/ic_view_stream_white.png");
$btn_img->onTap(changeView());
$acb->addControl($btn_img);
$win->addControl($acb);
//Add action bar in panel.
$table = new Table();
$table->setClass("tableGray");
$grid = new Grid();
$table_grid = new Table();
$table_grid->setClass("tableGrid");
$table_grid->setRowsStyle("80dip");
$table_grid->setColumnsStyle("35%;65%;15dip");
$table_grid->setHeight("85dip");
$grid->addSearch($title);
$grid->addData(grid_load());
$grid->onTap(action());
$grid->setEmptyGridText("No items available");
//inputs and controls
$title = new InputText(150);
$title->setClass("input.titleList");
$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");
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:31,代码来源:ProductList.php


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