예제 #1
0
              return kendo.stringify(data);
          }');
$model = new \Kendo\Data\DataSourceSchemaModel();
$orderIDField = new \Kendo\Data\DataSourceSchemaModelField('OrderID');
$orderIDField->type('number');
$shipNameField = new \Kendo\Data\DataSourceSchemaModelField('ShipName');
$shipNameField->type('string');
$shipAddressField = new \Kendo\Data\DataSourceSchemaModelField('ShipAddress');
$shipAddressField->type('string');
$shipCountryField = new \Kendo\Data\DataSourceSchemaModelField('ShipCountry');
$shipCountryField->type('string');
$model->addField($orderIDField)->addField($shipNameField)->addField($shipAddressField)->addField($shipCountryField);
$schema = new \Kendo\Data\DataSourceSchema();
$schema->data('data')->model($model)->total('total');
$dataSource = new \Kendo\Data\DataSource();
$dataSource->transport($transport)->pageSize(30)->schema($schema)->serverSorting(true)->serverFiltering(true)->serverPaging(true);
$grid = new \Kendo\UI\Grid('grid');
$orderID = new \Kendo\UI\GridColumn();
$orderID->field('OrderID')->width(130)->title('Order ID');
$shipCountry = new \Kendo\UI\GridColumn();
$shipCountry->field('ShipCountry')->width(160)->title('Ship Country');
$shipName = new \Kendo\UI\GridColumn();
$shipName->field('ShipName')->title('Ship Name')->width(220);
$shipAddress = new \Kendo\UI\GridColumn();
$shipAddress->field('ShipAddress')->filterable(false)->title('Ship Address');
$grid->dataSource($dataSource)->addColumn($orderID, $shipCountry, $shipName, $shipAddress)->height(430)->columnMenu(true)->pageable(true)->sortable(true)->filterable(true);
echo $grid->render();
?>

<?php 
require_once '../include/footer.php';
예제 #2
0
파일: hierarchy.php 프로젝트: neevan1e/Done
$transport->read($read)->parameterMap('function(data) {
                return kendo.stringify(data);
              }');
$schema = new \Kendo\Data\DataSourceSchema();
$schema->data('data')->total('total');
$dataSource = new \Kendo\Data\DataSource();
$filter = new \Kendo\Data\DataSourceFilterItem();
$filter->field('EmployeeID')->operator('eq')->value('#=EmployeeID#');
$dataSource->transport($transport)->pageSize(5)->schema($schema)->addFilterItem($filter)->serverSorting(true)->serverFiltering(true)->serverPaging(true);
$detailGrid = new \Kendo\UI\Grid('detailGrid#=EmployeeID#');
$orderID = new \Kendo\UI\GridColumn();
$orderID->field('OrderID')->width(70)->title('Order ID');
$shipCountry = new \Kendo\UI\GridColumn();
$shipCountry->field('ShipCountry')->width(110)->title('Ship Country');
$shipAddress = new \Kendo\UI\GridColumn();
$shipAddress->field('ShipAddress')->title('Ship Address');
$shipName = new \Kendo\UI\GridColumn();
$shipName->field('ShipName')->title('Ship Name')->width(200);
$detailGrid->dataSource($dataSource)->addColumn($orderID, $shipCountry, $shipAddress, $shipName)->pageable(true)->sortable(true)->scrollable(false);
echo $detailGrid->renderInTemplate();
?>
</script>

<script>
    function dataBound() {
        this.expandRow(this.tbody.find("tr.k-master-row").first());
    }
</script>

<?php 
require_once '../include/footer.php';
예제 #3
0
              return kendo.stringify(data);
          }');
$model = new \Kendo\Data\DataSourceSchemaModel();
$orderIDField = new \Kendo\Data\DataSourceSchemaModelField('OrderID');
$orderIDField->type('number');
$shipNameField = new \Kendo\Data\DataSourceSchemaModelField('ShipName');
$shipNameField->type('string');
$shipAddressField = new \Kendo\Data\DataSourceSchemaModelField('ShipAddress');
$shipAddressField->type('string');
$shipCountryField = new \Kendo\Data\DataSourceSchemaModelField('ShipCountry');
$shipCountryField->type('string');
$model->addField($orderIDField)->addField($shipNameField)->addField($shipAddressField)->addField($shipCountryField);
$schema = new \Kendo\Data\DataSourceSchema();
$schema->data('data')->model($model)->total('total');
$dataSource = new \Kendo\Data\DataSource();
$dataSource->transport($transport)->pageSize(15)->serverPaging(true)->serverSorting(true)->schema($schema);
$grid = new \Kendo\UI\Grid('rowSelection');
$orderID = new \Kendo\UI\GridColumn();
$orderID->field('OrderID')->width(130)->title('Order ID');
$shipCountry = new \Kendo\UI\GridColumn();
$shipCountry->field('ShipCountry')->width(160)->title('Ship Country');
$shipName = new \Kendo\UI\GridColumn();
$shipName->field('ShipName')->title('Ship Name')->width(220);
$shipAddress = new \Kendo\UI\GridColumn();
$shipAddress->field('ShipAddress')->filterable(false)->title('Ship Address');
$grid->dataSource($dataSource)->addColumn($orderID, $shipCountry, $shipName, $shipAddress)->height(430)->resizable(true)->pageable(true);
echo $grid->render();
?>

<?php 
require_once '../include/footer.php';
예제 #4
0
$countryField->type('string');
$photoField = new \Kendo\Data\DataSourceSchemaModelField('Photo');
$photoField->type('string');
$model->addField($employeeIDField)->addField($firstNameField)->addField($lastNameField)->addField($countryField)->addField($photoField);
$schema = new \Kendo\Data\DataSourceSchema();
$schema->data('data')->model($model)->total('total');
$dataSource = new \Kendo\Data\DataSource();
$dataSource->transport($transport)->schema($schema);
$picture = new \Kendo\UI\GridColumn();
$picture->field('EmployeeID')->width(110)->title('Picture');
$details = new \Kendo\UI\GridColumn();
$details->width(600)->title('Details');
$id = new \Kendo\UI\GridColumn();
$id->title('ID');
$grid = new \Kendo\UI\Grid('grid');
$grid->dataSource($dataSource)->addColumn($picture, $details, $id)->rowTemplateId('row-template')->altRowTemplateId('alt-row-template')->height(430);
echo $grid->render();
?>

<script id="row-template" type="text/x-kendo-template">
  <tr data-uid="#: uid #">
    <td class="photo">
      <img src="../content/web/Employees/#:EmployeeID#.jpg" alt="#: EmployeeID #" />
    </td>
    <td class="details">
      <span class="title">#: Title #</span>
      <span class="description">Name : #: FirstName# #: LastName#</span>
      <span class="description">Country : #: Country# </span>
    </td>
    <td class="employeeID">
      #: EmployeeID #