Esempio n. 1
0
}
require_once '../include/header.php';
?>
<div class="demo-section">
    <h2>Customers</h2>
<?php 
$read = new \Kendo\Data\DataSourceTransportRead();
$read->url('template.php')->type('POST');
$transport = new \Kendo\Data\DataSourceTransport();
$transport->read($read);
$schema = new \Kendo\Data\DataSourceSchema();
$schema->data('data')->total('total');
$dataSource = new \Kendo\Data\DataSource();
$dataSource->transport($transport)->schema($schema);
$comboBox = new \Kendo\UI\ComboBox('customers');
$comboBox->minLength(1)->dataTextField('ContactName')->dataSource($dataSource)->attr("style", "width:400px")->headerTemplate(<<<TEMPLATE
<div class="dropdown-header"><span class="k-widget k-header">Photo</span><span class="k-widget k-header">Contact info</span></div>
TEMPLATE
)->template(<<<TEMPLATE
<span class="k-state-default"><img src="../content/web/Customers/#= CustomerID #.jpg" alt="#= CustomerID #" /></span><span class="k-state-default"><h3>#: data.ContactName #</h3><p>#: data.CompanyName #</p></span>
TEMPLATE
);
echo $comboBox->render();
?>
</div>

<div class="demo-section">
    <h2>Information</h2>
    <p>
        Open the ComboBox to see the customized appearance of the items.
    </p>