Esempio n. 1
0
<?php

require_once '../lib/DataSourceResult.php';
require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
$comboBox = new \Kendo\UI\ComboBox('combobox');
$comboBox->dataTextField('text')->dataValueField('value')->dataSource(array(array('text' => 'Item 1', 'value' => '1'), array('text' => 'Item 2', 'value' => '2'), array('text' => 'Item 3', 'value' => '3')))->dataBound('onDataBound')->select('onSelect')->change('onChange')->close('onClose')->open('onOpen');
?>
<div class="demo-section">
    <h3 class="title">ComboBox
    </h3>
<?php 
echo $comboBox->render();
?>
</div>

<script>
    function onOpen() {
        if ("kendoConsole" in window) {
            kendoConsole.log("event: open");
        }
    }

    function onClose() {
        if ("kendoConsole" in window) {
            kendoConsole.log("event: close");
        }
    }

    function onChange() {
        if ("kendoConsole" in window) {
Esempio n. 2
0
    <div class="config-section">
    <span class="configHead">Select</span>
    <ul class="options">
        <li>
            <input id="index" value="0" class="k-textbox" style="width: 40px; margin: 0;" /> <button id="select" class="k-button">Select by index</button>
        </li>
        <li>
            <input id="value" value="1" class="k-textbox" style="width: 40px; margin: 0;" /> <button id="setValue" class="k-button">Select by value</button>
        </li>
    </ul>
    </div>
</div>
<div class="demo-section">
<?php 
$comboBox = new \Kendo\UI\ComboBox('movies');
$comboBox->dataTextField('text')->dataValueField('value')->attr('style', 'width: 250px')->dataSource(array(array('text' => '12 Angry Men', 'value' => 1), array('text' => 'Il buono, il brutto, il cattivo.', 'value' => 2), array('text' => 'Inception', 'value' => 3), array('text' => "One Flew Over the Cuckoo's Nest", 'value' => 4), array('text' => 'Pulp Fiction', 'value' => 5), array('text' => "Schindler's List", 'value' => 6), array('text' => 'The Dark Knight', 'value' => 7), array('text' => 'The Godfather', 'value' => 8), array('text' => 'The Godfather: Part II', 'value' => 9), array('text' => 'The Shawshank Redemption', 'value' => 10), array('text' => 'The Shawshank Redemption 2', 'value' => 11)));
echo $comboBox->render();
?>
</div>
<script>
$(function() {
    $("#filter").kendoDropDownList({
        change: filterTypeOnChanged
    });

    var combobox = $("#movies").data("kendoComboBox"),
        setValue = function(e) {
            if (e.type != "keypress" || kendo.keys.ENTER == e.keyCode)
                combobox.value($("#value").val());
        },
        setIndex = function(e) {
Esempio n. 3
0
<?php

require_once '../lib/DataSourceResult.php';
require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
?>
<div class="demo-section">
    <div class="k-rtl">
        <h2>RTL ComboBox</h2>
<?php 
$comboBox = new \Kendo\UI\ComboBox('combobox');
$comboBox->dataTextField('text')->dataValueField('value')->dataSource(array(array('text' => 'Item 1', 'value' => '1'), array('text' => 'Item 2', 'value' => '2'), array('text' => 'Item 3', 'value' => '3')));
echo $comboBox->render();
?>
    </div>
</div>
<style scoped>
    .demo-section {
        width: 250px;
        margin: 35px auto 50px;
        padding: 30px;
    }
    .demo-section h2 {
        text-transform: uppercase;
        font-size: 1.2em;
        margin-bottom: 10px;
    }
</style>
<?php 
require_once '../include/footer.php';