예제 #1
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';
예제 #2
0
$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);
$orders = new \Kendo\UI\TabStripItem();
$orders->text('Orders')->selected(true)->content($detailGrid->renderInTemplate());
//add grid to the tabstrip item content
$contact = new \Kendo\UI\TabStripItem();
$contact->text('Contact Information');
$contact->startContent();
?>
        <div class="employee-details">
            <ul>
                <li><label>Country:</label>#= Country #</li>
                <li><label>City:</label>#= City #</li>
                <li><label>Address:</label>#= Address #</li>
                <li><label>Home Phone:</label>#= HomePhone #</li>
            </ul>
        </div>
<?php 
$contact->endContent();